Including custom data in the order confirmation from an external API

I know it is possible to alter the order confirmation email itself, but can I add custom data from an external API inside the order confirmation email sent to the customer?

Or is the only option to send a new email afterwards to the customer, with the custom data/API?