---
title: "Create Saved Search"
method: POST
path: "/api/v2/saved-searches"
tags: ["Saved Searches"]
---

# Create Saved Search

`POST /api/v2/saved-searches`

Creates a new saved search.

## Request body

- SavedSearchInput
  - `name` string, required — Display name for the saved search.
  - `sourceId` string, required — ID of the source to query. Must belong to the team.
  - `select` string — Comma-separated list of column expressions to display. Empty uses the source default.
  - `where` string — Row filter expression. The language is controlled by whereLanguage.
  - `whereLanguage` 'lucene' | 'sql' — Language used for the where filter.
  - `orderBy` string — ORDER BY expression. Empty uses the source default.
  - `tags` string[] — Tags used to organize saved searches.
  - `filters` SavedSearchFilter[] — Structured pinned filters applied to the search.
    - `type` 'sql' — Always `sql`. Only SQL predicate filters render in the sidebar.
    - `condition` string, required — SQL predicate applied to the search, in `<column> IN (...)` form.

## Response `200`

Successfully created saved search

- SavedSearchResponseEnvelope
  - `data` SavedSearch
    - `id` string, required — Unique saved search ID. Server-generated.
    - `name` string, required — Display name for the saved search.
    - `sourceId` string, required — ID of the source this saved search queries.
    - `select` string — Comma-separated list of column expressions to display. Empty uses the source default.
    - `where` string — Row filter expression. The language is controlled by whereLanguage.
    - `whereLanguage` 'lucene' | 'sql' — Language used for the where filter.
    - `orderBy` string — ORDER BY expression. Empty uses the source default.
    - `tags` string[] — Tags used to organize saved searches.
    - `filters` SavedSearchFilter[] — Structured pinned filters applied to the search.
      - `type` 'sql' — Always `sql`. Only SQL predicate filters render in the sidebar.
      - `condition` string, required — SQL predicate applied to the search, in `<column> IN (...)` form.
    - `teamId` string — ID of the team that owns the saved search.
    - `createdAt` string, date-time — Creation timestamp.
    - `updatedAt` string, date-time — Last update timestamp.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden

## Changes

- **2026-07-08** `6f4381730123` — 1 info
  - endpoint added
- **2026-01-30** `ed852374c451` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/hyperdxio/apis/hyperdx-external-api/changes/api/v2/saved-searches/post.md)

---

[API](https://skmtc.dev/hyperdxio/apis/hyperdx-external-api.md) · [All operations](https://skmtc.dev/hyperdxio/apis/hyperdx-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hyperdxio/hyperdx-external-api/revisions/3399efdca551/schema)
