> ## Documentation Index
> Fetch the complete documentation index at: https://loops.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an audience segment

> Retrieve a single audience segment by ID, including its filter rules and contact count, to inspect or reuse it when targeting Loops campaigns.

## Request

### Path parameters

<ParamField path="id" type="string" required>
  The ID of the audience segment.
</ParamField>

## Response

### Success

<ResponseField name="id" type="string" required>
  The audience segment ID.
</ResponseField>

<ResponseField name="name" type="string" required>
  The segment name.
</ResponseField>

<ResponseField name="description" type="nullable string" required>
  An optional description for the segment.
</ResponseField>

<ResponseField name="createdAt" type="string" required>
  ISO 8601 timestamp for when the segment was created.
</ResponseField>

<ResponseField name="updatedAt" type="string" required>
  ISO 8601 timestamp for when the segment was last updated.
</ResponseField>

<ResponseField name="filter" type="object" required>
  A tree of audience conditions combined with `match`.

  <Expandable title="filter" defaultOpen={false}>
    <ResponseField name="match" type="string" required>
      How conditions are combined. One of `all` or `any`.
    </ResponseField>

    <ResponseField name="conditions" type="array" required>
      One or more conditions. Each condition has a `type` field:

      <Expandable title="property condition" defaultOpen={false}>
        <ResponseField name="type" type="string" required>
          `"property"`
        </ResponseField>

        <ResponseField name="key" type="string" required>
          The contact property name.
        </ResponseField>

        <ResponseField name="operator" type="string" required>
          One of `any`, `contains`, `notContains`, `equals`, `notEquals`,
          `greaterThan`, `lessThan`, `isTrue`, `isFalse`, `empty`, `notEmpty`,
          `dateEmpty`, `dateNotEmpty`, `after`, `before`, or `between`.
        </ResponseField>

        <ResponseField name="value" type="string | number | object">
          The comparison value. Omitted for value-less operators (for example
          `isTrue` or `empty`). A `{ from, to }` object for `between`.
        </ResponseField>
      </Expandable>

      <Expandable title="optIn condition" defaultOpen={false}>
        <ResponseField name="type" type="string" required>
          `"optIn"`
        </ResponseField>

        <ResponseField name="status" type="nullable string" required>
          One of `accepted`, `pending`, `rejected`, or `null`.
        </ResponseField>
      </Expandable>

      <Expandable title="activity condition" defaultOpen={false}>
        <ResponseField name="type" type="string" required>
          `"activity"`
        </ResponseField>

        <ResponseField name="action" type="string" required>
          One of `sent`, `opened`, or `clicked`.
        </ResponseField>

        <ResponseField name="negate" type="boolean" required>
          Whether to invert the match.
        </ResponseField>

        <ResponseField name="target" type="string" required>
          One of `campaign`, `workflow`, or `workflowEmail`.
        </ResponseField>

        <ResponseField name="id" type="string" required>
          The ID of the campaign, workflow, or workflow email.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Error

A `400 Bad Request` is returned if `id` is invalid.

A `404 Not Found` is returned if the audience segment does not exist.

If the API key is invalid (or content API is not enabled for your team), a
`401 Unauthorized` is returned.

<ResponseField name="message" type="string" required>
  An error message describing what went wrong.
</ResponseField>

<ResponseExample>
  ```json Response theme={"dark"}
  {
    "id": "seg_01hxyz",
    "name": "Active users",
    "description": "Users active in the last 30 days",
    "createdAt": "2026-03-28T15:00:00.000Z",
    "updatedAt": "2026-03-28T15:00:00.000Z",
    "filter": {
      "match": "all",
      "conditions": [
        {
          "type": "property",
          "key": "plan",
          "operator": "equals",
          "value": "pro"
        }
      ]
    }
  }
  ```

  ```json Error response theme={"dark"}
  {
    "message": "Audience segment not found."
  }
  ```
</ResponseExample>
