> ## 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

# Set Google Ads connection mode (/docs/api/account/onboarding-set-google-ads-connection-mode)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 913 · 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 how the person will connect Google Ads during onboarding: central_read_only (Product Metrics' manager account sends an invite the person accepts in Google Ads; see google_ads.send_invite) or user_oauth (the person's own Google sign-in reaches the account).

`PUT https://prod-backend.productmetrics.io/api/public/v1/onboarding/google-ads-connection-mode`

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

## Try it

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



**productmetrics CLI:**

```bash
productmetrics onboarding set-google-ads-connection-mode \
  --google-ads-connection-mode central_read_only \
  --json
```

**curl:**

```bash
curl -X PUT "https://prod-backend.productmetrics.io/api/public/v1/onboarding/google-ads-connection-mode" \
  -H "Authorization: Bearer $PM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"google_ads_connection_mode":"central_read_only"}'
```

## Response

API response (200):

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

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

## Before you call

This only stores the choice; connect an account with [`google_ads.create_property_connection`](/docs/api/google-ads/create-property-connection) afterwards.

## Body

| Name                         | Type | Required | Description                                                                                                                                                     |
| ---------------------------- | ---- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `google_ads_connection_mode` | enum | Yes      | `central_read_only`: Product Metrics' manager account sends an invite; `user_oauth`: the person's own Google sign-in. One of `central_read_only`, `user_oauth`. |

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

| 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)
