At this time we do not support the ability to track dynamically generated links. Will make sure to pass the feedback on to that team, not the first developer who has asked this question.
The details about how to create an email through the API are here. To create an XHTML email, you would change the email content type and email content nodes (including any custom fields in the email content node with the rest of the HTML code). The HTML contents should be encoded before they're sent to us.
<EmailContentFormat>XHTML</EmailContentFormat> <EmailContent><html><body><p>Hello <Property name="Subscriber.FirstName" />!</p></body></html></EmailContent>
API Support Specialist
View API documentation, code samples, get your API key.Visit Page