---
title: "Preview Population Demographics"
method: POST
path: "/workspaces/{workspace_id}/populations/{population_id}/demographic-preview"
tags: ["populations"]
---

# Preview Population Demographics

`POST /workspaces/{workspace_id}/populations/{population_id}/demographic-preview`

## Request

- Base URL: `https://api.useauxos.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.useauxos.com/workspaces/{workspace_id}/populations/{population_id}/demographic-preview`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/useauxos/apis/auxos/docs/workspaces/:workspace_id/populations/:population_id/demographic-preview/post.ts> (a function with typed inputs; its response is checked against the schema)

Filter vocabulary + total/matching counts, computed in SQL.

## Path parameters

- `population_id` string, uuid, required
- `workspace_id` string, uuid, required

## Request body

- DemographicPreviewRequest
  - `demographic_filter` object, nullable

## Response `200`

Successful Response

- DemographicPreviewResponse: Vocabulary plus exact counts — never persona rows. An empty filter reports ``matching_count == total_count``.
  - `status` 'completed', required
  - `attributes` PopulationFilterAttribute[], required
    - `key` string, required
    - `label` string, required
    - `values` string[], required
  - `total_count` integer, required
  - `matching_count` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/useauxos/apis/auxos.md) - [All operations](https://skmtc.dev/useauxos/apis/auxos/llms.txt) - [OpenAPI document](https://skmtc.dev/useauxos/apis/auxos/revisions/2f853c0b59f4?raw)
