updated api to handle fromUserId