# How do I pass UTM information when creating a contact through the API?

**URL:** <https://community.hubspot.com/t/how-do-i-pass-utm-information-when-creating-a-contact-through-the-api/80443>\
**Category:** APIs & Integrations\
**Tags:** professional, contacts\
**Created:** [May 2, 2023, 9:21pm UTC](https://community.hubspot.com/t/how-do-i-pass-utm-information-when-creating-a-contact-through-the-api/80443 "2023-05-02T21:21:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BBlakeley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bblakeley/32/198492_2.png) [@BBlakeley](https://community.hubspot.com/u/BBlakeley)\
**Post date:** [May 2, 2023, 9:21pm UTC](https://community.hubspot.com/t/how-do-i-pass-utm-information-when-creating-a-contact-through-the-api/80443/1 "2023-05-02T21:21:22Z")

</div>

I’m using the HubSpot API to create a new contact whenever a lead submits our lead form. I’d like to associate the UTM data (search term, etc.) with this contact so that we can better evaluate and direct our marketing efforts. [This post](https://community.hubspot.com/t5/APIs-Integrations/How-to-pass-UTM-information-when-creating-a-contact-through-the/m-p/499259) seems to describe how to do that with the now legacy documentation, but I can’t find how to do this with the latest version of the API as there doesn’t seem to be an equivalent forms submission endpoint.

---

<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:** [May 3, 2023, 9:55pm UTC](https://community.hubspot.com/t/how-do-i-pass-utm-information-when-creating-a-contact-through-the-api/80443/2 "2023-05-03T21:55:10Z")

</div>

Hey, @BBlakeley 👋 The [Form submission endpoint](https://legacydocs.hubspot.com/docs/methods/forms/submit_form) linked to in the solution you referenced is stable and supported. Unless explicitly flagged for depreciation, Legacy endpoints are safe to use for production purposes.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![BBlakeley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bblakeley/32/198492_2.png) [@BBlakeley](https://community.hubspot.com/u/BBlakeley)\
**Post date:** [May 3, 2023, 10:10pm UTC](https://community.hubspot.com/t/how-do-i-pass-utm-information-when-creating-a-contact-through-the-api/80443/3 "2023-05-03T22:10:17Z")

</div>

Thanks! But what’s the correct way to handle this with the current API?
