---
title: "Create Saved Search"
method: PUT
path: "/api/saved_searches/"
tags: ["SavedSearches"]
---

# Create Saved Search

`PUT /api/saved_searches/`

## Request

- The document declares no server URL.
- Auth: none declared

Gracefully creates a new saved search from the provided schema.

If a saved search with the same name already exists, the saved search's fields are
replaced.

## Headers

- `x-prefect-api-version` string

## Request body

- SavedSearchCreate: Data used by the Prefect REST API to create a saved search.
  - `name` string, required: The name of the saved search.
  - `filters` SavedSearchFilter[]: The filter set for the saved search.
    - `object` string, required: The object over which to filter.
    - `property` string, required: The property of the object on which to filter.
    - `type` string, required: The type of the property.
    - `operation` string, required: The operator to apply to the object. For example, `equals`.
    - `value` unknown, required

## Response `200`

Successful Response

- SavedSearch: An ORM representation of saved search data. Represents a set of filter criteria.
  - `id` string, uuid
  - `created` string, date-time
  - `updated` string, date-time
  - `name` string, required: The name of the saved search.
  - `filters` SavedSearchFilter[]: The filter set for the saved search.
    - `object` string, required: The object over which to filter.
    - `property` string, required: The property of the object on which to filter.
    - `type` string, required: The type of the property.
    - `operation` string, required: The operator to apply to the object. For example, `equals`.
    - `value` unknown, required

## Other responses

- `422`: Validation Error

## Changes

- **2024-04-03** `93ae2b3f2efd`: 1 breaking
  - the request property `name` became required

[Operation history](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api/changes/api/saved_searches/put.md)

---

[API](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api.md) - [All operations](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api/llms.txt) - [OpenAPI document](https://skmtc.dev/prefecthq/apis/prefect-unreleased-api/revisions/29ba6c4f8837?raw)
