FAQ
Is the service Free?
Yes this service is totally free.
How Many API Endpoints can I create?
You can create as many as you like.
How many forms can I add to the API
You can add the API to many forms as you like.
How do you make money?
At the moment we are not making any money from this service. We might implement additional features like file attachments for a fee in the near future. However the current service will stay free.
Can I host this myself on my server?
Yes you can! You can download the script from our GitHub Repository from here.
Can I use this API on JavaScript forms?
Yes you can! You can use the below script as an example:
const form = document.querySelector('#contact-form');
form.addEventListener('submit', async (event) => {
event.preventDefault();
const data = new FormData(event.target);
try {
const response = await fetch('https://api.formgit.com/{unique_address}', {
method: 'POST',
body: data
});
if (response.ok) {
alert('Message sent successfully!');
form.reset();
} else {
throw new Error('Failed to send message.');
}
} catch (error) {
console.error(error);
alert('An error occurred while sending the message.');
}
});
In this example, the form data is sent to the endpoint https://api.formgit.com/{unique_address} using the POST method. The FormData constructor is used to create a new FormData object from the form data, which is then sent in the request body using the fetch method. If the response from the API endpoint has an OK status (i.e., 200-299), the user is alerted that the message was sent successfully and the form is reset. If the response has a non-OK status, an error is thrown and the user is alerted that the message failed to send.
Do you store any data?
We do not store any data. Emails are sent via the PHP mail() Function. The email logs are deleted with every email sent by using the following PHP command: exec(‘rm /var/log/maillog’);
You can check the script on our GitHub Repository.
Why are the form submissions ending in my spam folder?
Emails are sent via our server using the PHP mail() Function. Unfortunately, we do not use services like SendGrid. This however, enables us to offer this service for free.
You can easily create filters in your email account to allow form submissions received using our API to go to the inbox.