How to Use YCBM API to Fetch Booking Count Based on User Email?

Hi everyone,
I’m currently working on a WordPress plugin that integrates YouCanBook.me (YCBM) with Ultimate Member. The goal is to fetch the number of bookings associated with each logged-in user based on their email address (which matches the email used in YCBM bookings).

I already have the YCBM API Key, but I’m not entirely sure how to:

  1. Fetch all bookings for a specific email address
  2. Count how many bookings are associated with that email
  3. (Optional) Filter bookings by status (e.g., only confirmed)

Could someone point me to the correct endpoint and example API request to achieve this?

@doniwirawan this could be possible with our new Bookings Query endpoint.
GET would be to:
/v1/accounts/{accountId}/bookings/query

Field parameters you would need:
searchText={customersEmail}
pageSize=500
from=2025-05-01T00:00:00Z
searchTextCriteria=form
statuses=(one of [tentative, rejected, cancelled, upcoming, inProgress, finished, noShow])

so something like this:
/v1/accounts/{accountId}/bookings/query?searchText=email@domain.com&pageSize=500&from=2025-05-01T00:00:00Z&searchTextCriteria=form