The helpdesk already has templates, which allow you to add pre-made text (with images and attachments) to a ticket. You can add/edit these on the Configuration -> Ticket Content page at the bottom, or on the ticket page in case you've got the permission.
We'll consider adding the possibility for example formats and custom formats for custom fields. Currently this is not possible.
All about the API should be explained on the Configuration -> Ticket API page. Depending on what you want and how you configure things this might be possible. You should be able to get most ticket data, though custom field currently cannot be requested using the API.
We're also planning on adding more parameters to email templates in one of our next big releases.