# Submitting multiple form values in a single api call

**URL:** <https://community.hubspot.com/t/submitting-multiple-form-values-in-a-single-api-call/20999>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [May 19, 2020, 5:29pm UTC](https://community.hubspot.com/t/submitting-multiple-form-values-in-a-single-api-call/20999 "2020-05-19T17:29:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![newMember](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/newmember/32/77060_2.png) [@newMember](https://community.hubspot.com/u/newMember)\
**Post date:** [May 19, 2020, 5:29pm UTC](https://community.hubspot.com/t/submitting-multiple-form-values-in-a-single-api-call/20999/1 "2020-05-19T17:29:52Z")

</div>

Hii,

I am a beginner in CRM. My doubt is, Can we submit the form values of a form, where the form values will be an array containing many values, with a single api call???

```auto
$data2 = array (
	'fields' =>
		[
			[
				[
					'name' => 'email',
					'value' => '333coomonwilliamdizuzass@a.com',
				],
				[
					'name' => 'firstname',
					'value' => '33dizzuu22',
				],
				[
					'name' => 'lastname',
					'value' => '333Grwilluge222',
				],
				[
					'name' => 'grouptestname',
					'value' => '33Grnogroupge',
				],
				[
					'name' => 'roletestname',
					'value' => 'Grge',
				],
				[
					'name' => 'userdatatest',
					'value' => 'Grge',
				],
				[
					'name' => 'roletest',
					'value' => '2',
				],
			],
			[
				[
					'name' => 'email',
					'value' => 'hoorrraayyy@a.com',
				],
				[
					'name' => 'firstname',
					'value' => 'hoorrraayyy',
				],
				[
					'name' => 'lastname',
					'value' => 'hoorrraayyy',
				],
				[
					'name' => 'grouptestname',
					'value' => 'hoorrraayyy',
				],
				[
					'name' => 'roletestname',
					'value' => 'hoorrraayyy',
				],
				[
					'name' => 'userdatatest',
					'value' => 'Grge',
				],
				[
					'name' => 'roletest',
					'value' => '2',
				],
			]
			// 2 =>
			// array (
			// 'name' => 'lastname',
			// 'value' => 'Gregory',
			// ),
			// 3 =>
			// array (
			// 'name' => 'grouptestname',
			// 'value' => '2291 Festival',
			// ),
			// 4 =>
			// array (
			// 'name' => 'roletestname',
			// 'value' => 'gguuuujj',
			// ),
			// 5 =>
			// array (
			// 'name' => 'userdatatest',
			// 'value' => 'Leadership LeadershipLeadership LeadershipLeadershipLeadershipLeadership LeadershipLeadershipLeadership Leadership',
			// ),
		],
	'skipValidation' => true,
	'context' =>
		array (
			'hutk' => $hubspotutk,
			'pageUri' => 'url here',
			'pageName' => 'Example page',
		),
);

Can someone help with a solution???

```

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [May 20, 2020, 5:12am UTC](https://community.hubspot.com/t/submitting-multiple-form-values-in-a-single-api-call/20999/2 "2020-05-20T05:12:27Z")

</div>

Hey @newMember,

Just to clarify, is there a reason why you’d like to send array values via the HubSpot Form API? Are you looking to pass enumeration fields? If so, as mentioned by Connor on this [forum thread](https://community.hubspot.com/t5/APIs-Integrations/How-to-insert-enumeration-field-values-into-forms-API/td-p/228890), **enumeration field should be separated by a semicolon**.

The Form data format for HubSpot Form API will have to follow the example formt stated on this documentation: [Submit data for a form | Forms API](https://developers.hubspot.com/docs/methods/forms/submit_form). It is not possible to send array as the form value.

---

<div class="post-metadata">

**Author:** ![newMember](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/newmember/32/77060_2.png) [@newMember](https://community.hubspot.com/u/newMember)\
**Post date:** [May 20, 2020, 8:16am UTC](https://community.hubspot.com/t/submitting-multiple-form-values-in-a-single-api-call/20999/3 "2020-05-20T08:16:35Z")

</div>

Hi @WendyGoh

My requirement is, generate multiple contact entries in hubspot with a single api call?? Is that possible???

Suppose that it is a shopping site. I am ordering for two products and I need to submit these datas to hubspot as two contacts (for first product one contact, for second product as another contact) in single api call. I hope you understand??

---

<div class="post-metadata">

**Author:** ![Willson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/willson/32/84663_2.png) [@Willson](https://community.hubspot.com/u/Willson)\
**Post date:** [May 20, 2020, 8:40am UTC](https://community.hubspot.com/t/submitting-multiple-form-values-in-a-single-api-call/20999/4 "2020-05-20T08:40:15Z")

</div>

Hi @newMember

Happy to jump in here!

To confirm, our Forms API can not be used to batch create contacts via 1 submission. It can only process 1 submission against a single record via the passed email address.

If you’re looking to batch create contacts, you’re best suited to using our[Batch API found here](https://developers.hubspot.com/docs/api/crm/contacts). See below:

```auto
POST /crm/v3/objects/contacts/batch/create

Request URL: https://api.hubapi.com/crm/v3/objects/contacts/batch/create?hapikey=YOUR_HUBSPOT_API_KEY

```

I hope this helps!
