> ## Documentation Index
> Fetch the complete documentation index at: https://6f524b4-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://6f524b4-productmetrics.manicule.dev/docs/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://6f524b4-productmetrics.manicule.dev/docs/api/mcp.
> Every agent surface: https://6f524b4-productmetrics.manicule.dev/docs/.well-known/llms-manifest.json

# Set account type (/docs/api/account/onboarding-set-account-type)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 837 · 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), [Complete onboarding](/docs/api/account/onboarding-complete.md)

> Records whether the signed-in person runs Google Ads for their own business (direct_advertiser) or for clients (agency).

`PUT https://prod-backend.productmetrics.io/api/public/v1/onboarding/account-type`

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

## Try it

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



**productmetrics CLI:**

```bash
productmetrics onboarding set-account-type --account-type agency --json
```

**curl:**

```bash
curl -X PUT "https://prod-backend.productmetrics.io/api/public/v1/onboarding/account-type" \
  -H "Authorization: Bearer $PM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"account_type":"agency"}'
```

## Response

API response (200):

```json
{
  "data": {
    "success": true
  },
  "request_id": "req_01J10MAPHEF82MC019DKA4NM50"
}
```

**CLI output:** `productmetrics onboarding set-account-type --json` prints `{ "ok": true, "data": …, "request_id": "…" }` with the same `data`.

## Before you call

It only records the choice: [`onboarding.complete`](/docs/api/account/onboarding-complete) saves it to the account, and [`companies.create`](/docs/api/account/companies-create) needs it saved. So for a new account: this, then [`onboarding.complete`](/docs/api/account/onboarding-complete), then [`companies.create`](/docs/api/account/companies-create).

## Body

| Name           | Type | Required | Description                                                                                            |
| -------------- | ---- | -------- | ------------------------------------------------------------------------------------------------------ |
| `account_type` | enum | Yes      | `direct_advertiser` for your own business, `agency` for clients. One of `agency`, `direct_advertiser`. |

## 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_01JTRZT8Q5F4YMFZM6DVR39TSD"
}
```

| Status | Code                 | When                                                                                                                      |
| ------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| 400    | `invalid_request`    | A path, query or body value does not match this page. `details.issues` lists each `location`, `path` and `message`.       |
| 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)
