---
title: "Connect the chosen Google Analytics property"
method: POST
path: "/v1/connect/googleanalytics/select-property"
tags: ["Connect"]
---

# Connect the chosen Google Analytics property

`POST /v1/connect/googleanalytics/select-property`

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/connect/googleanalytics/select-property`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Connect-Token`

For headless flows. Connects the property the user picked as a `googleanalytics` account and returns where to send the user next.

- On success: your `redirect_url` with `connected=googleanalytics`, `profileId`, `accountId` and `username`.
- When the connect was refused (for example a billing block): an `error`.

Consumes the `pendingDataToken`; a refused or failed attempt leaves it usable for a retry.

Send your API key (or connect token) for the same profile with a headless token.

## Request body

- object
  - `pendingDataToken` string, required: Token from the headless redirect.
  - `propertyId` string, required: A propertyId from the properties list.

## Response `200`

The property is connected, or the connect was refused with a reason in redirect_url

- object
  - `redirect_url` string: Where to send the user next.
  - `account` object, nullable: The connected account, or null when the connect was refused.
    - `accountId` string
    - `platform` string
    - `username` string
    - `displayName` string

## Other responses

- `400`: Invalid request
- `403`: The connect token was issued for a different profile or platform (INSUFFICIENT_PERMISSIONS).
- `404`: The pending sign-in expired or was already used. Start the connect again.
- `500`: Google or Zernio failed while saving. The pendingDataToken stays usable; retry.

## Changes

- **2026-10-29** `134756fb8dc2`: 1 info
  - added the non-success response with the status `403`
- **2026-10-26** `cef81aa186cc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/connect/googleanalytics/select-property/post.md)

---

[API](https://skmtc.dev/zernio/apis/zernio-api.md) - [All operations](https://skmtc.dev/zernio/apis/zernio-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zernio/apis/zernio-api/revisions/c319eb5d95b6?raw)
