Entitlement membership

In my current PS, I am fetching all the entitlements, and based on that, I am obtaining the Entitlement ID.

Now, using the Entitlement ID, I am attempting to execute a search query to retrieve the Entitlement Membership details.

$searchUri = “https://$tenant.identitynow.com/api/v3/search
write-host “searchUri is $searchUri”
$searchPayload = @{

query = @{
query = “@access(id:entitlementId)”
}
}

$result = Invoke-RestMethod -Method Post -Uri $searchUri -Headers $headers -Body ($searchPayload | ConvertTo-Json -Depth 10)

getting an error - result is @{response=; status=404; options=; message=Cannot POST /api/v3/search; name=NotFoundException}

just correct me is this correct snippet code or any alternative way to achieve this issue