---
title: "Retrieve accounts with a set flag state"
method: GET
path: "/feature-flags/2026-09/{appId}/flags/{flagName}/portals"
tags: ["Basic"]
---

# Retrieve accounts with a set flag state

`GET /feature-flags/2026-09/{appId}/flags/{flagName}/portals`

## Request

- Base URL: `https://api.hubapi.com`
- URL: `https://api.hubapi.com/feature-flags/2026-09/{appId}/flags/{flagName}/portals`
- Auth: API key in query parameter `hapikey`

Retrieve a list of HubSpot accounts with an account-level flag setting for the specified app. No request body is included.

## Path parameters

- `appId` integer, required
- `flagName` string, required

## Query parameters

- `limit` integer
- `startPortalId` integer

## Response `200`

successful operation

- PortalFlagStateBatchResponse
  - `portalFlagStates` PortalFlagStateResponse[], required: An array of portal flag state responses, each representing the state of a feature flag for a specific portal.
    - `appId` integer, required: The ID of the app
    - `flagName` string, required: The name of the flag
    - `flagState` 'ABSENT' | 'OFF' | 'ON', required: The state of the flag for this portal
    - `portalId` integer, required: The ID of the portal

## Other responses

- `default`: An error occurred.

## Changes

- **2026-10-10** (2026-09) `de25edbdcd67`: 2 info
  - the endpoint scheme security `developer_hapikey` was added to the API
  - the endpoint scheme security `oauth2` was removed from the API

[Operation history](https://skmtc.dev/hubspot/apis/crm-public-app-feature-flags-v3/changes/feature-flags/2026-09/:appId/flags/:flagName/portals/get.md)

---

[API](https://skmtc.dev/hubspot/apis/crm-public-app-feature-flags-v3.md) - [All operations](https://skmtc.dev/hubspot/apis/crm-public-app-feature-flags-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/crm-public-app-feature-flags-v3/revisions/de25edbdcd67?raw)
