The BBC Radio 1 presenter said Mendes was “mortified” that he had failed to call in to his show.
James shared a screenshot on Instagram of messages the singer sent him.
Mendes, 22, wrote: “I just want to say I’m so sorry.
“I’m not sure what happened yesterday but between miscommunication and a long day things got messed up.
“No excuse to have you live on air though.
“I’m very sorry and would never do that intentionally.”
James said he had to call to check the messages were real.
He also shared a screenshot of his reply, which said: “And also, while I’ve got you, from one long-haired sex symbol to another, can you recommend some good styling products please?”
Mendes told him he uses Moroccan hydrating cream and “some oil to lock in the edges”.
James said he would “get him back on the show soon if he’s not too creeped out by the messages about his hair that I sent from bed”.