validate API params