# How to create a search saved object with kibana API

**URL:** <https://discuss.elastic.co/t/how-to-create-a-search-saved-object-with-kibana-api/268963>\
**Category:** Kibana\
**Created:** [March 31, 2021, 10:43pm UTC](https://discuss.elastic.co/t/how-to-create-a-search-saved-object-with-kibana-api/268963 "2021-03-31T22:43:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BhavyaSree](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyasree/32/86426_2.png) [@BhavyaSree](https://discuss.elastic.co/u/BhavyaSree)\
**Post date:** [March 31, 2021, 10:43pm UTC](https://discuss.elastic.co/t/how-to-create-a-search-saved-object-with-kibana-api/268963/1 "2021-03-31T22:43:25Z")

</div>

I tried to create a **search saved object** with kibana API. I could able to create the object with selected columns and sort, but I am unable to add filters to the search.

Below is the body of POST call I used.

```json
{
  "attributes": {
    "title": "object 1",
    "columns": [
       "Carrier",
       "Cancelled"
    ],
    "sort": "@timestamp"
  }
}

```

I am not sure on adding filters to the search. Can someone please help me here.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 1, 2021, 5:41am UTC](https://discuss.elastic.co/t/how-to-create-a-search-saved-object-with-kibana-api/268963/2 "2021-04-01T05:41:00Z")

</div>

Hi @BhavyaSree welcome to the community!

I often suggest folks to create an object to through the Kibana UI first (in your case a saved search which you can do though Discover) and then run the Find and Get saved object APIs and see what it looks like and then you can use that as a template for how to create one like you want.

Perhaps give that a try.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 29, 2021, 5:41am UTC](https://discuss.elastic.co/t/how-to-create-a-search-saved-object-with-kibana-api/268963/3 "2021-04-29T05:41:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
