# API call to find records based on enum values

**URL:** <https://community.fibery.io/t/api-call-to-find-records-based-on-enum-values/10114>\
**Category:** API & Programming\
**Created:** [November 30, 2025, 9:29pm UTC](https://community.fibery.io/t/api-call-to-find-records-based-on-enum-values/10114 "2025-11-30T21:29:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AirDiamond](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/airdiamond/32/13399_2.png) [@AirDiamond](https://community.fibery.io/u/AirDiamond)\
**Post date:** [November 30, 2025, 9:29pm UTC](https://community.fibery.io/t/api-call-to-find-records-based-on-enum-values/10114/1 "2025-11-30T21:29:56Z")

</div>

In the code below, I’m trying to find records that have “Confirmed” selected in the “Endorsement” single-select field. It’s not working and the AI is sending me on a wild goose chase of different variation, none of which work. Anyone have any idea how this is done?

`{`  
`“command”: “fibery.entity/query”,`  
`“args”: {`  
`“query”: {`  
`“q/from”: “Campaign Template/People”,`  
`“q/select”: [`  
`“fibery/id”,`  
`“Campaign Template/Name”`  
`],`  
`“q/where”: [`  
`[“Campaign Template/Endorsement”, “=”, “Confirmed”]`  
`],`  
`“q/limit”: 3`  
`}`  
`}`  
`}`

---

<div class="post-metadata">

**Author:** ![itsu](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/itsu/32/1775_2.png) [@itsu](https://community.fibery.io/u/itsu)\
**Post date:** [November 30, 2025, 9:34pm UTC](https://community.fibery.io/t/api-call-to-find-records-based-on-enum-values/10114/2 "2025-11-30T21:34:56Z")

</div>

Please check out the API documentation on how to [Filter entities](https://the.fibery.io/@public/User_Guide/Guide/Entity-API-264/anchor=Filter-Entities--38afb672-fb3b-4c59-800d-8c34b4e528f9)

```auto
curl -X POST https://YOUR_ACCOUNT.fibery.io/api/commands \
     -H 'Authorization: Token YOUR_TOKEN' \
     -H 'Content-Type: application/json' \
     -d \
      '
         {
           "command": "fibery.entity/query",
           "args": {
             "query": {
               "q/from": "Cricket/Player",
               "q/select": ["Cricket/name", { "Cricket/Batting Hand": ["enum/name"] } ],
               "q/where": ["=", ["Cricket/Batting Hand", "enum/name"], "$hand" ],
               "q/limit": 2
             },
             "params": {
               "$hand": "Right"
             }
           }
         }
       '

```

---

<div class="post-metadata">

**Author:** ![AirDiamond](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/airdiamond/32/13399_2.png) [@AirDiamond](https://community.fibery.io/u/AirDiamond)\
**Post date:** [November 30, 2025, 10:38pm UTC](https://community.fibery.io/t/api-call-to-find-records-based-on-enum-values/10114/3 "2025-11-30T22:38:43Z")

</div>

Thank you! I started there, but I had a typo that I couldn’t see at the time. (One set too many brackets.) When I asked the AI what I was doing wrong, I went way far off base! But it’s working now. Thank you!

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [December 1, 2025, 10:01am UTC](https://community.fibery.io/t/api-call-to-find-records-based-on-enum-values/10114/4 "2025-12-01T10:01:47Z")

</div>


