If you want to create Landing Pages it is recommended that you use embed code as described on this page.
But in some cases, you may want to integrate signup forms into the mobile app or perform some custom integration and in this case, you may want to use JSON API. Since every signup form is different it offers different fields with different values in them.
You can see the fields and values if you navigate to the API endpoint of YOUR system:
- For Live Form: https://SECURE.YOURDOMAIN.COM/api/account-types/live
- For Demo Form: https://SECURE.YOURDOMAIN.COM/api/account-types/demo
Here is an example in PHP:
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://SECURE.YOURDOMAINNAME.COM/api/open-live-account',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"tradingAccountTypeId": "539814f0-30e2-11eb-98df-01010010011", //
"firstName": "Barya",
"lastName": "Test",
"email": "barya0131212313123@yopmail.com",
"birthDate": "2001-12-19",
"password": "*******",
"country": "AF",
"language": "en" // keep it like this
}'
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
You can create a POST request to create Leads (API for your "Contact Us" form) records.
curl --location --request POST 'https://SECURE.YOURDOMAINNAME.COM/api/contact-us' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "John",
"email": "John@mail.com",
"phone": "+35633434334",
"question": "Hey! How do I trade?"
}'