Email branding and API call within template logic

We have a requirement on our implementation that requires us to have the emails branding based on an attribute value captured at the UserProfile.

To accommodate this requirement we are planning on using CMS to retrieve graphics and few contact information that needs to go on the email based on the User’s attribute.

Can we have an API call invocation in the email template that will request the CMS API retrieve required content that needs to be stubbed into the email?