Request could not be served, the endpoint was not found

Hi I am doing:

  const api = new API({
    url: process.env.GHOST_API_URL,
    key: process.env.GHOST_API_KEY,
    version: 'v5.0',
  })
  const results = await api.members.read({ email: 'emailr@email.com' })

but getting error " Request could not be served, the endpoint was not found."

does anyone now why? I think its something to do with versions. I am using v recent ghost install. what version should i have in header?

can you share further up the code, where you define API? Are you hitting the content API, or Admin API?

Its’ the admin api

"dependencies": {
    "@tryghost/admin-api": "^1.13.11",
  
import API from '@tryghost/admin-api';

I know the api client is basically working because the browse call works just not the read call.

export default async (req, res, next) => {
  const api = new API({
    url: process.env.GHOST_API_URL,
    key: process.env.GHOST_API_KEY,
    version: 'v5.0',
  })

  const allMembers = await api.members.browse({ limi: 'all' })
  console.log(allMembers) // this works fine