# Can support forms be submitted via the forms API?

**URL:** <https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706>\
**Category:** Tickets & Conversations\
**Tags:** conversations-inbox\
**Created:** [August 12, 2019, 1:04am UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706 "2019-08-12T01:04:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaious](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaious/32/94821_2.png) [@kaious](https://community.hubspot.com/u/kaious)\
**Post date:** [August 12, 2019, 1:04am UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/1 "2019-08-12T01:04:41Z")

</div>

If we setup a support form to create conversations directly into our support inbox as detailed here: [https://www.hubspot.com/product-updates/support-conversations](https://www.hubspot.com/product-updates/support-conversations) can that form receive submissions via the forms API like a normal HubSpot marketing hub form?

---

<div class="post-metadata">

**Author:** ![kaious](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaious/32/94821_2.png) [@kaious](https://community.hubspot.com/u/kaious)\
**Post date:** [August 12, 2019, 6:33am UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/2 "2019-08-12T06:33:36Z")

</div>

Went ahead and tested it, and yes, you can submit via the API. Just have to grab the API name for the _issue_ and _details_ fields (which are **TICKET.subject** and **TICKET.content** respectively, in case anyone else is wondering)

---

<div class="post-metadata">

**Author:** ![sharonlicari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sharonlicari/32/101479_2.png) [@sharonlicari](https://community.hubspot.com/u/sharonlicari)\
**Post date:** [August 12, 2019, 11:12am UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/3 "2019-08-12T11:12:57Z")

</div>

Thank you for sharing this @kaious

Have a great rest of the week!

Best,

Sharon

---

<div class="post-metadata">

**Author:** ![ellefsen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ellefsen/32/79091_2.png) [@ellefsen](https://community.hubspot.com/u/ellefsen)\
**Post date:** [August 29, 2019, 10:15am UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/4 "2019-08-29T10:15:53Z")

</div>

@kaious are you using the AJAX method? I’ve tried submitting these fields as you describe, but I’m still unable to get past validation. If I add “TICKET.subject” to the fieldname I get an “Error in ‘fields.TICKET.subject’. Field ‘TICKET.subject’ isn’t in form definition”.

Any ideas?

---

<div class="post-metadata">

**Author:** ![kaious](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaious/32/94821_2.png) [@kaious](https://community.hubspot.com/u/kaious)\
**Post date:** [August 29, 2019, 10:23pm UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/5 "2019-08-29T22:23:01Z")

</div>

Hi @ellefsen - we’re using a custom form built on our website which collects the data and passes it to HubSpot via the forms API directly from our server, as opposed to a form embed ([https://developers.hubspot.com/docs/methods/forms/forms\_overview)](https://developers.hubspot.com/docs/methods/forms/forms_overview)

And make sure you’re using a specific ticket form, not a general hubspot form (ie setup here: [https://app.hubspot.com/live-messages-settings/{YOURPORTALID}/inboxes/edit/3246/forms](https://app.hubspot.com/live-messages-settings/%7BYOURPORTALID%7D/inboxes/edit/3246/forms) )

Not sure if it’s any help, but here’s the body of the API call we’re making:

{“fields”:

[

{

“name”:“email”,

“[value":"kaitestfeedbackformgeneral3@graphicfood.com](mailto:value%22:%22kaitestfeedbackformgeneral3@graphicfood.com)”

},

{

“name”:“joyous\_source”,

“value”:“info-end-user.js”

},

{

“name”:“firstname”,

“value”:“Kai”

},

{

“name”:“lastname”,

“value”:“Crow”

},

{

“name”:“phone”,

“value”:“987636792390”

},

{

“name”:“TICKET.subject”,

“value”:“Joyous user enquiry form - Kai Crow”

},

{

“name”:“TICKET.content”,

“value”:“And another test!”

}

],“context”:{“pageUri”:“[http://localhost:3000/on-behalf-of",“pageName”:"About](http://localhost:3000/on-behalf-of%22,%22pageName%22:%22About) Joyous”},“skipValidation”:true}

\*Maybe that last skip validation piece is the key?

This is how the ticket shows up in HubSpot:

 ![Screen Shot 2019-08-30 at 10.22.05 AM.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/e/ea8936dda0f4f2aa58e17fb385a3f845d0d0e444.png)

---

<div class="post-metadata">

**Author:** ![doublesharp](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/doublesharp/32/98997_2.png) [@doublesharp](https://community.hubspot.com/u/doublesharp)\
**Post date:** [October 7, 2019, 6:01am UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/6 "2019-10-07T06:01:39Z")

</div>

I can confirm that I was unable to get this to work until I added

`skipValidation: true`

to the form data. Thanks!

---

<div class="post-metadata">

**Author:** ![clickbitsmh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/clickbitsmh/32/2490_2.png) [@clickbitsmh](https://community.hubspot.com/u/clickbitsmh)\
**Post date:** [May 6, 2020, 1:44pm UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/7 "2020-05-06T13:44:19Z")

</div>

I can confirm that the fields TICKET.subject and TICKET.content are only accepted when skipValidation is set to true.

But with skipValidation, the API does not decline invalid email addresses. If I submit an email address like “abcdef”, the API responds with status code 200 but has not created a ticket. So te end user submits our custom form, our server receives a status code 200, but the submitted ticket content is lost.

How can I ensure that a ticket has been created or get a failure status code if not?

---

<div class="post-metadata">

**Author:** ![kaious](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaious/32/94821_2.png) [@kaious](https://community.hubspot.com/u/kaious)\
**Post date:** [May 6, 2020, 9:03pm UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/8 "2020-05-06T21:03:59Z")

</div>

If it’s just email address you want to validate, could you not build the validation on the form directly rather than waiting for the API response? (just a javascript regex validation on field update or something along those lines)

---

<div class="post-metadata">

**Author:** ![clickbitsmh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/clickbitsmh/32/2490_2.png) [@clickbitsmh](https://community.hubspot.com/u/clickbitsmh)\
**Post date:** [May 7, 2020, 6:01am UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/9 "2020-05-07T06:01:03Z")

</div>

I’m already validating the email address on the form, but I don’t know the exact validation algorithm hubspot uses. If for some reason my validation passes but hubspot declines the email address, there is no ticket in hubspot but the end user did not get an error message.

---

<div class="post-metadata">

**Author:** ![kaious](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaious/32/94821_2.png) [@kaious](https://community.hubspot.com/u/kaious)\
**Post date:** [May 7, 2020, 7:01am UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/10 "2020-05-07T07:01:25Z")

</div>

I think if you’re ensuring the email address follows the valid pattern for an email address, you’ll be pretty safe. Here’s something on how HS validates, not sure if it’s useful.

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Ffaq%2Fhow-does-hubspot-validate-email-addresses)**

Also, I believe if the email address is found to be invalid, there will still be a contact and ticket created, just they will not be sent an email.

---

<div class="post-metadata">

**Author:** ![kaious](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaious/32/94821_2.png) [@kaious](https://community.hubspot.com/u/kaious)\
**Post date:** [August 29, 2019, 10:26pm UTC](https://community.hubspot.com/t/can-support-forms-be-submitted-via-the-forms-api/15706/11 "2019-08-29T22:26:38Z")

</div>

Sorry @ellefsen, also the endpoint we’re using is [https://api.hsforms.com/submissions/v3/integration/submit/](https://api.hsforms.com/submissions/v3/integration/submit/) - so I believe that is the AJAX method?
