accesstoken with POST :
https://HELMDECK_NAME.helmdeck.com/oauth/token?grant_type=password&client_id=MY_ID&client_secret=MY_SECRET&password=HELMDECK_PASSWORD&username=HELMDECK_USERNAME
so basicallly you need:
POST:
https://HELMDECK_NAME.helmdeck.com/services/restapi/json/Lead/create
authorization before http header “Authorization” “Bearer ACCESSTOKEN”
php example with httpful.phar library
<$response = \Httpful\Request::post("https://HELMDECK_NAME.helmdeck.com/oauth/token?grant_type=password&client_id=" . MY_ID . "&client_secret=" . MY_SECRET . "&password=" . HELMDECK_PASSWORD. "&username=" . HELMDECK_USERNAME) ->send(); $access_token = $response->body->access_token;>
<$access_token = $response->body->access_token; $response = \Httpful\Request::post("https://HELMDECK_NAME.helmdeck.com/services/restapi/json/Lead/create") ->body(http_build_query(array( 'name' => $_POST['name'], 'surname' => $_POST['surname'], 'companyName' => $_POST['companyName'], 'sourceId' => DICTIONARY_ID, 'mainPhoneNumber.suffix' => $_POST['phone'], 'mainPhoneNumber.prefix' => '1', ))) ->addHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8') ->addHeader('Authorization', 'Bearer ' . $access_token) ->send(); $leadId = $response->body->id;>