api = ::Hubspot::Crm::Contacts::BasicApi.new
api.create({firstname: 'john', lastname: 'doe', email: '[email protected]'}.to_json, auth_names: 'hapikey')
The request gets executed, but the details are not visible on Hubspot contactlist, It shows empty contact without firstname, lastname and email.
Here is the response, when I fetch the details by contact_id
<Hubspot::Crm::Contacts::SimplePublicObjectWithAssociations:0x000055d0bc6ad2a8
@archived=false,
@created_at=Fri, 11 Mar 2022 12:52:44 +0000,
@id="456501",
@properties=
{"createdate"=>"2022-03-11T12:52:44.492Z",
"email"=>"",
"firstname"=>"",
"hs_object_id"=>"456501",
"lastmodifieddate"=>"2022-03-11T12:53:01.375Z",
"lastname"=>""},
@updated_at=Fri, 11 Mar 2022 12:53:01 +0000>
I have configured the API key in config file properly
Try this to update you created contact :