About this Cloud Hub Solution:
As software developers, we're all too familiar with the frustration of coding a form backend to collect just a few simple fields. But with this API, creating a new form endpoint is a breeze.
This solution is perfect for designers and developers alike, allowing you to create and use your form endpoint in a matter of seconds. Whenever someone submits a form, all the information is automatically collected and stored for you, including details about the submitter's browser, operating system, location, and more.
What's more, this API keeps things simple and secure by avoiding the use of CSS libraries, iframes, and complex structures. And with automatic generation of single-use CSRF (cross-site request forgery) tokens, you can rest assured that your forms are protected from spambots. This means you can focus on what matters most - building great applications - without worrying about the security and complexity of form handling.
How to use it
Start by creating a new form and giving it a name.
curl --request POST \--url 'https://api.apilayer.com/form' \--header 'apikey: YOUR API KEY' \--data-raw 'My cool form'It will generate a form and return it's unique id and the URL for submission.{ "id": "d2f1d1a6-dd80-11ea-9926-0242c0a83002", "name": "My cool form", "form_url": "https://form.codes/f/d2f1d1a6-dd80-11ea-9926-0242c0a83002"}
Notice the form url above and use it anywhere as the action value of any HTML form on your code.
Take a look at the script just below the HTML form. This script is essential as it generates a unique CSRF token for your form, providing an extra layer of protection against spammers. Make sure to include it in your code.
With this simple setup, you're all set to collect any information submitted to your form and access all its details using a powerful API.