# Can I create a new query in Data Explorer using API?

**URL:** https://meta.discourse.org/t/can-i-create-a-new-query-in-data-explorer-using-api/264529
**Category:** Development
**Tags:** data-explorer, rest-api
**Created:** [May 10, 2023, 12:14pm UTC](https://meta.discourse.org/t/can-i-create-a-new-query-in-data-explorer-using-api/264529 "2023-05-10T12:14:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![utku](https://avatars.discourse-cdn.com/v4/letter/u/3ab097/32.png) [@utku](https://meta.discourse.org/u/utku)
#### Post date: [May 10, 2023, 12:14pm UTC](https://meta.discourse.org/t/can-i-create-a-new-query-in-data-explorer-using-api/264529/1 "2023-05-10T12:14:37Z")

</div>

I can run the existing queries with or without parameters. I tried some POST calls to create a new query in [Data Explorer](https://meta.discourse.org/t/32566?silent=true) without using the Admin console, but failed. Is there a method to create/delete a query in [Data Explorer](https://meta.discourse.org/t/32566?silent=true)?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 10, 2023, 3:41pm UTC](https://meta.discourse.org/t/can-i-create-a-new-query-in-data-explorer-using-api/264529/2 "2023-05-10T15:41:54Z")

</div>

It’s certainly possible. You can [Reverse engineer the Discourse API](https://meta.discourse.org/t/reverse-engineer-the-discourse-api/20576) to do anything with the API that you can do in the UX.

If you’ve tried something that didn’t work, you can share your code so that others might make suggestions.

---

<div class="post-metadata">

### Author: ![MarkDoerr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markdoerr/32/549630_2.png) [@MarkDoerr](https://meta.discourse.org/u/MarkDoerr)
#### Post date: [January 26, 2026, 11:34pm UTC](https://meta.discourse.org/t/can-i-create-a-new-query-in-data-explorer-using-api/264529/4 "2026-01-26T23:34:16Z")

</div>

Sorry to revive this old topic, but I’ve just created a dedicated topic showing how to do this: [Create a Data Explorer query using the API](https://meta.discourse.org/t/create-a-data-explorer-query-using-the-api/394388)
