Answer by Japanese teacher
OK is also used in Japanese so you can say OK desu. Alternatively, you can use daijoobu desu. The word 大丈夫(だいじょうぶ) daijoobu literally means “fine, alright”. So this phrase means you’re fine with whatever was said before. You can use it to mean “OK” in Japanese. Add a hai (yes) in front to confirm.
If it is your boss who asked you to do something instead, it may be better to say hai, wakarimashita.