Issues on creating contacts



I'm using the Offline form api in order to send the data gathered from our online form.
The data flow is the following:
User fills the form on the webpage->data is sent by post to our server, it saves on the DB and also triggers an event that will send info to hubspot-> data is written as array to be sent (email, company, number and stuff)-> hubspot create the contact.
The issue we are having is the following, while creating the array it sets one variable as true that will be used on the hubspot to organize the flow. most of the contacts created come with this variable as true and source as Offline, API. like its supposed to be BUT some random cases come from google as source, so it dont create the variable,(come as nothing) and other cases like also not creating the variable. WHat could be causing this? from the contact its possible to see that the person created from the original website so it was supposed to pass on the offline, API flow


Hey @GxPinheiro, happy to help. Would you please send over:

  1. An example contact that has the correct (Offline, API) source
  2. An example contact that has the incorrect source
  3. An example request you're making to the specific endpoint you're using.

Can you also please clarify which variable you're referring to that's changing?



Is not exactly "incorrect" they are just isolated cases that happens to be different.
private static function createRequest($path, $params, $pathComplement = 'contacts/v1/contact/'){
$api = ''.$pathComplement.''.$path;
$http = Shared_Helpers_Http::getClient( $api, array('timeout'=>3));
$http->setHeaders('Content-Type: application/json');
$http->setRawData( json_encode(($params)) );
return $http;

And lastly the variable is called: trial


Got it, thanks for that @GxPinheiro. So to confirm, you're using this endpoint, correct?


Thats correct, so in theory all contacts should come with OfflineSources API?


Hi @GxPinheiro, correct -- digging into what might have happened. I'll keep you posted and will let you know if I need any other info. Thanks!


Hey @GxPinheiro, this contact was created via a collected form here: Anybody can go to your site and submit a collected form if collected forms are turned on in your settings:

More about collected forms here:


Got it, and what about this case?


That would also be from a Collected Form.

You can see all collected forms here: and filtering for "Non-HubSpot". You'll be able to see associated contacts who've filled out those forms as well.