APIs have been around since the dawn of computing
They are just a documented way of handling the arguments in a subroutine call.
What's new-ish is the ability to run subroutine calls across a public network*, where you don't necessarily have ownership or control of the far end, and potentially paying for the privilege. This enables monetisation of (micro-)services, and a network effect of many people using the same API operating on common shared data. A bit like one fax machine being useless, two being of limited utility, but connect fax machines to a public telephone network and you suddenly have a new way of sending information around.
*Remote procedure calls have been around since the early 80s, and were an academic curiosity before then. New-ish in the history of computing. Possibly just discovered by Marketing?