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

# Retrieve accounts with a set flag state

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

## Request

- Base URL: `https://api.hubapi.com`
- URL: `https://api.hubapi.com/feature-flags/2026-03/{appId}/flags/{flagName}/portals`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `hapikey`
  - none

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

- CrmFeatureFlagsPortalFlagStateBatchResponse
  - `portalFlagStates` CrmFeatureFlagsPortalFlagStateResponse[], required
    - `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

> 14 revisions in range; 1 not diffed, 2 could not be searched.

- **2026-03-30** `dc2fdad57f7f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/hubspot/apis/hubspot-api-specification/changes/feature-flags/2026-03/:appId/flags/:flagName/portals/get.md)

---

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