# How to submit data to a form through an API

**URL:** <https://community.hubspot.com/t/how-to-submit-data-to-a-form-through-an-api/45687>\
**Category:** APIs & Integrations\
**Tags:** forms\
**Created:** [October 21, 2021, 2:24am UTC](https://community.hubspot.com/t/how-to-submit-data-to-a-form-through-an-api/45687 "2021-10-21T02:24:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nossan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/nossan/32/28756_2.png) [@Nossan](https://community.hubspot.com/u/Nossan)\
**Post date:** [October 21, 2021, 2:24am UTC](https://community.hubspot.com/t/how-to-submit-data-to-a-form-through-an-api/45687/1 "2021-10-21T02:24:22Z")

</div>

I ask for help!

I think I can submit data to a from through the follow API:

[https://legacydocs.hubspot.com/docs/methods/forms/submit\_form](https://legacydocs.hubspot.com/docs/methods/forms/submit_form)

But, the url includes “legacydocs” and I cannot find similar API at [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/marketing/forms).

What’s the latest way to submit data to a form through an API?

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [October 21, 2021, 5:34am UTC](https://community.hubspot.com/t/how-to-submit-data-to-a-form-through-an-api/45687/2 "2021-10-21T05:34:13Z")

</div>

Hi @Nossan ,

[https://legacydocs.hubspot.com/docs/methods/forms/submit\_form](https://legacydocs.hubspot.com/docs/methods/forms/submit_form) is the latest API available to submit forms. The new API docs are still being created, so not everything is complete or migrated yet. So sometimes, you need to use the legacydocs, which is not a problem, unless you see ‘DEPRECATED’ above documentation.

---

<div class="post-metadata">

**Author:** ![Nossan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/nossan/32/28756_2.png) [@Nossan](https://community.hubspot.com/u/Nossan)\
**Post date:** [October 21, 2021, 5:37am UTC](https://community.hubspot.com/t/how-to-submit-data-to-a-form-through-an-api/45687/3 "2021-10-21T05:37:41Z")

</div>

Thank you for your reply, @Teun !

Your answer solved my problem!!

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [October 21, 2021, 5:46am UTC](https://community.hubspot.com/t/how-to-submit-data-to-a-form-through-an-api/45687/4 "2021-10-21T05:46:36Z")

</div>

Happy to help!
