Submit Form using v3 integration returns 400 response with no error messages

Trying to submit form data using https://legacydocs.hubspot.com/docs/methods/forms/submit_form

body:

{“fields”:[{“name”:“firstname”,“value”:“Howard”},{“name”:“lastname”,“value”:“Shelburne”},{“name”:“company”,“value”:“Ordaos”},{“name”:“email”,“value”:“hshelburne@gmail.com”},{“name”:“mobilephone”,“value”:“3365557772”},{“name”:“reason_to_get_in_touch”,“value”:“Interest in a research project”},{“name”:“comment”,“value”:“Testing Form Submission”}],“context”:{“pageUri”:“www.ordaos.bio/contact-us”,“pageName”:“Conact Us”}}

I have tried using various other bodies, including adding `objectTypeId: “0-1”` to each field object, adding legalConsentOptions (this is not a GDPR enabled portal), and various other changes. I do not receive any error messaging for what may be incorrectly formatted and have only had a 400 response.

Hi @HShelbur ,

Check if you have the right portal ID and Form ID in the endpoint.

Your best chance is to do some debugging. So start with the body below and add and remove parts from there. The body below does work, so try going from there (use postman if you can):

{
 "submittedAt": "1642659340000",
 "fields": [
 {
 "name": "email",
 "value": "teun@bureaubright.nl"
 },
 {
 "name": "firstname",
 "value": "Teun"
 },
 {
 "name": "lastname",
 "value": "Rutten"
 }
 ],
 "context": {
 "hutk": null,
 "pageUri": "https://example.com/",
 "pageName": "Test for tracking script"
 },
 "legalConsentOptions": {
 "consent": {
 "consentToProcess": true,
 "text": "I agree to allow Example Company to store and process my personal data.",
 "communications": [

 ]
 }
 }
}

The issue ended up being that you cannot have a reCAPTCHA in your form if you want to use the API, removing the reCAPTCHA option from the form in the marketing form builder allows for submissions.