---
title: "Segment %alias records with a one-off group"
method: GET
path: "/objects/adHocGroup"
tags: ["objects"]
---

# Segment %alias records with a one-off group

`GET /objects/adHocGroup`

## Request

- Base URL: `https://api.ontraport.com/1`
- URL: `https://api.ontraport.com/1/objects/adHocGroup`
- Auth: none declared

Runs the Group engine (the machinery behind saved segments) on ad-hoc filter rows — the registered POST counterpart of the internal getGroupByFilter flow. filters is a JSON array of legacy group rows {field, operation, value}: operation is one of the engine's op letters (e equals, n not equal, s starts with, z ends with, c contains/has, k does not contain/has not, l less than, g greater than, m at most, h at least, o is empty, x is not empty); a comma inside value is an OR across values. Rows are ANDed. Field must be a plain API-readable object field or a supported named complex field; caller-supplied starred, dotted, and nested saved-group expressions are rejected, and hidden fields cannot be used for filtering or sorting. Explicit tag, sequence, and campaign IDs are scoped to the requested object type. Answers an integer count when count=true; record mode returns API-readable fields with the same deprecated-field removal and PII masking as the standard object API.

## Query parameters

- `objectID` integer, required
- `filters` string
- `related` string
- `count` boolean
- `range` integer
- `start` integer
- `sort` string
- `sortDir` string

## Response `200`

Successful segmentation: an integer count, or raw record rows

- Response
  - `code` integer, required
  - `data` object, required
  - `account_id` integer, required

## Other responses

- `400`: Contract violation: missing objectID, malformed or empty filters, unknown operation letter
- `403`: No permissions

## Changes

- **2026-09-30** `c102850cff71`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ontraport/apis/ontraport-api/changes/objects/adHocGroup/get.md)

---

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