# Using Axios to send an email using a template

**URL:** <https://forum.mautic.org/t/using-axios-to-send-an-email-using-a-template/33304>\
**Category:** Development\
**Created:** [August 28, 2024, 3:29pm UTC](https://forum.mautic.org/t/using-axios-to-send-an-email-using-a-template/33304 "2024-08-28T15:29:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrianr1974](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/adrianr1974/32/6591_2.png) [@adrianr1974](https://forum.mautic.org/u/adrianr1974)\
**Post date:** [August 28, 2024, 3:29pm UTC](https://forum.mautic.org/t/using-axios-to-send-an-email-using-a-template/33304/1 "2024-08-28T15:29:36Z")

</div>

I would like to send an email from a project using a template that I created in Mautic.

An architect that I’m working with send me this code:

axios  
.post(  
“https:///api/contacts/”,  
{  
userFirstName: “Fred”,  
cpName: “Flintstone”,  
emailLink: “[https://app.smarterrisk.com/asdfasdf](https://app.smarterrisk.com/asdfasdf)”  
},

```
    {
     headers: {
     "Authorization": username + ":" + password
     },
   }
)

```

.then(function (response) {  
// successful, do the rest of the code here  
console.log(response);  
})

.catch(function (error) {  
// unsuccessful, send error response back  
console.log(error);  
});

How would I specify which Mautic email template to use?
