api validation