---
title: "Search User Stories identifiers or grouped values"
method: POST
path: "/dashboard/api/user-stories/search-options"
tags: ["Dashboard"]
---

# Search User Stories identifiers or grouped values

`POST /dashboard/api/user-stories/search-options`

## Request

- Base URL: `https://api.agnost.ai`
- URL: `https://api.agnost.ai/dashboard/api/user-stories/search-options`
- Auth: one of:
  - HTTP bearer and API key in header `x-org-id`
  - API key in header `x-api-key`

Searches User ID, conversation ID, original conversation ID, and user email when ungrouped. When `group_by` is present, searches only values from that selected metadata field.

## Request body

- UserStoriesQueryFilters
  - `time_range` '1min' | '1h' | '1d' | '1w' | '1m' | 'all'
  - `connection_type` union
    - string
    - string[]
  - `agent_name` union
    - string
    - string[]
  - `metadata_filters` object[]
    - `key` string
    - `value` string
  - `page` integer
  - `page_size` integer
  - `search` string: Case-insensitive identifier search used to load matching search options.
  - `search_field` 'user_id' | 'conversation_id' | 'original_conversation_id' | 'user_email' | 'group_value': Structured identifier selected from User Stories search. Grouped requests accept only `group_value`.
  - `search_value` string: Exact value for the selected search field.
  - `group_by` UserStoriesGroupBy
    - `source` 'conversation_metadata' | 'user_metadata', required
    - `key` string, required: Metadata-map key to group by.
  - `sort` 'newest' | 'oldest'
  - `exclude_io` boolean: Omits event input/output payloads when true.
  - `allow_limited_preview` boolean: Dashboard-only flag for a small access-limited preview; programmatic clients should leave false.
  - `sentiment_ids` string[]: Restricts conversations to events matching any selected intent id.
  - `sop_ids` string[]: Restricts conversations to events matching any selected violation id.

## Response `200`

Matching structured identifiers from conversations in the selected organization and time range

- object
  - `options` object[], required
    - `field` 'user_id' | 'conversation_id' | 'original_conversation_id' | 'user_email' | 'group_value', required
    - `label` string, required
    - `value` string, required

## Changes

- **2026-11-03** `a61431b48f36`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agnost/apis/agnost-ai-api/changes/dashboard/api/user-stories/search-options/post.md)

---

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