query users threads API