# Set additional properties for creating contact via API

**URL:** <https://community.hubspot.com/t/set-additional-properties-for-creating-contact-via-api/63305>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [August 19, 2022, 2:07am UTC](https://community.hubspot.com/t/set-additional-properties-for-creating-contact-via-api/63305 "2022-08-19T02:07:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KSapaad](https://avatars.discourse-cdn.com/v4/letter/k/53a042/32.png) [@KSapaad](https://community.hubspot.com/u/KSapaad)\
**Post date:** [August 19, 2022, 2:07am UTC](https://community.hubspot.com/t/set-additional-properties-for-creating-contact-via-api/63305/1 "2022-08-19T02:07:57Z")

</div>

We have Integrated the HubSpot client with our lead management app, and we are creating the contact through API (Hubspot::Crm::Contacts::BasicApi.new.create ) when new signup happens in the lead management app.

We are sending the default properties, which are  
{  
“company”: “Biglytics”,  
“email”: “[bcooper@biglytics.net](mailto:bcooper@biglytics.net)”,  
“firstname”: “Bryan”,  
“lastname”: “Cooper”,  
“phone”: “(877) 929-0687”,  
“website”: “[biglytics.net](http://biglytics.net)”  
}

But we need to send more additional properties like hs\_analytics\_last\_referrer or hs\_analytics\_last\_url, but all these are the ready-only fields, and we are getting that error response.

Recently I saw one post in the community related to this: [https://community.hubspot.com/t5/APIs-Integrations/Set-quot-First-page-seen-quot-for-new-created-contacts-via-API/m-p/410829](https://community.hubspot.com/t5/APIs-Integrations/Set-quot-First-page-seen-quot-for-new-created-contacts-via-API/m-p/410829).

But in the reply, someone says the custom property, but my question is, even if we create the custom property, we cannot see that information under the Last referring site or Last Page Seen, and all right?

So how can we make it if we go for the custom property? Or how can we pass that information along with the default properties like

{  
“company”: “Biglytics”,  
“email”: “[bcooper@biglytics.net](mailto:bcooper@biglytics.net)”,  
“firstname”: “Bryan”,  
“lastname”: “Cooper”,  
“phone”: “(877) 929-0687”,  
“website”: “[biglytics.net](http://biglytics.net)”,  
“hs\_analytics\_last\_referrer”: ‘[https://www.test.com/sg/campaign/sapaad-online](https://www.test.com/sg/campaign/sapaad-online)’  
}

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [August 19, 2022, 9:52pm UTC](https://community.hubspot.com/t/set-additional-properties-for-creating-contact-via-api/63305/2 "2022-08-19T21:52:16Z")

</div>

Hi, @KSapaad 👋 Thanks for reaching out. Hey @ChrisoKlepke @Chris-M @LMeert, do you have any experience here?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![LMeert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lmeert/32/103847_2.png) [@LMeert](https://community.hubspot.com/u/LMeert)\
**Post date:** [August 22, 2022, 8:52am UTC](https://community.hubspot.com/t/set-additional-properties-for-creating-contact-via-api/63305/3 "2022-08-22T08:52:15Z")

</div>

Hi @KSapaad,

Using a custom property as mentionned in other thread won’t work with the hubspot native web analytics fields like Last referring site or Last Page Seen.

Why don’t you add the hubspot tracking script on your app and either :

- use the [identify](https://developers.hubspot.com/docs/api/events/tracking-code) method when your users sign up ?

or

- use the [forms API](https://legacydocs.hubspot.com/docs/methods/forms/submit_form?_ga=2.268390606.1914620841.1661154275-265360007.1653496860) to submit a form a create a user while passing the hutk cookie value (used by HubSpot to make the link between web analytics data and a contact).

In both cases you’ll benefit from all web analytics data provided natively by Hubspot as well as any property you want to populate while creating your contacts.

Hope this helps !  
If it does, please consider marking this answer as a solution 🙂

Best,

Ludwig
