---
title: "Get click-test regions and counts"
method: GET
path: "/surveys/{id}/questions/{questionId}/click-regions"
tags: ["Surveys"]
---

# Get click-test regions and counts

`GET /surveys/{id}/questions/{questionId}/click-regions`

## Request

- Base URL: `https://api.pickfu.com/v1`
- URL: `https://api.pickfu.com/v1/surveys/{id}/questions/{questionId}/click-regions`
- Auth: HTTP bearer

Returns the named boxes (regions) drawn on a click-test question's current image, and how respondents' clicks fall in them.

### Counting
- `mode=first` (default) counts each respondent's first click; `mode=all` counts every click.
- Boxes are half-open: a click on an edge two regions share counts in the right or lower one. A box reaching the image's right or bottom edge includes it.
- Each region and `outside` carry `count`, a whole-percent `share` (summing to 100) and, in `first` mode, a Wilson 95% interval `ci95` in percent.
- `noClearWinner` is a heuristic, not a significance test: true when the two most-clicked regions' intervals overlap, so no region should be called the winner yet.

### Filters
- `traits`: comma-separated trait value permalinks, as on the responses endpoint.
- `startX`, `startY`, `w`, `h`: a drag box as fractions of the image (all four or none). Only respondents with any click inside it are counted.

Regions belong to an image: after the question's image is replaced, `revision` is 0 and `regions` is empty until regions are saved for the new image. A click test without clicks answers zero counts. Returns 422 for a question that is not a click test or has no image.

## Path parameters

- `id` string, required
- `questionId` string, required

## Query parameters

- `mode` 'first' | 'all'
- `startX` number
- `startY` number
- `w` number
- `h` number
- `traits` string

## Response `200`

Default Response

- object
  - `imagePublicId` string: The question's current image
  - `revision` integer: The current revision for that image; 0 when none
  - `regions` object[]: Boxes as fractions of the image from its top left; empty when none
    - `key` string
    - `label` string, nullable
    - `x` number
    - `y` number
    - `w` number
    - `h` number
  - `source` string, nullable: `template` (seeded from a mockup template), `detected` or `drawn`; null when none
  - `counts` object
    - `mode` 'first' | 'all'
    - `respondents` integer: Respondents with at least one click, after filters
    - `clicks` integer: Clicks counted; equals `respondents` in `first` mode
    - `regions` object[]: One tally per region, in stored order
      - `key` string
      - `label` string, nullable
      - `count` integer
      - `share` integer: Whole percent of respondents (`first`) or clicks (`all`); the regions and `outside` sum to 100, or are all 0 with nothing counted
      - `ci95` object, nullable: Wilson 95% interval in percent, one decimal; null in `all` mode or with no respondents
        - `low` number
        - `high` number
    - `outside` object: Clicks outside every region
      - `count` integer
      - `share` integer: Whole percent of respondents (`first`) or clicks (`all`); the regions and `outside` sum to 100, or are all 0 with nothing counted
      - `ci95` object, nullable: Wilson 95% interval in percent, one decimal; null in `all` mode or with no respondents
        - `low` number
        - `high` number
    - `noClearWinner` boolean, nullable: A heuristic, not a significance test: true when the two most-clicked regions' intervals overlap (a tie always does), so no region should be called the winner yet. Null outside `first` mode, with fewer than two regions, or with no respondents.

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `422`: Default Response

---

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