Use variables when creating articles via REST API

I have a web app to create articles to multiple tickets at once (status updates for service faults for instance). Pushing articles on this way creates internal notes, unless there is an email address for the ticket customer provided. If the customer has an email address, then the article will be sent via email to the customer.

For this usage i want to take my email signature, which has custom variables like #{user.firstname} or #{user.phone} in it. Each agent using this web app has its own api key, so the ticket system can safely detect, who is writing the article. Now i want to fill those variables depending on the agent.

Is this possible, and if so, how can i do this? Using the variables as string in the article body-tag wont work.