How to submit custom form data using REST API

Highlighted
Level 2

How to submit custom form data using REST API

Can anyone have a suggestion to submit custom form data using REST API to the Marketo form fields ?

4 REPLIES 4
Highlighted
Level 10 - Community Moderator

Re: How to submit custom form data using REST API

Please be more specific about why you're not using the Forms 2.0 JS API (on the client side) to submit form data to Marketo. This is by far the recommended approach to enable scale and functionality without opening a DoS vulnerability.

Highlighted
Level 2

Re: How to submit custom form data using REST API

Hi Vipin, You can use Marketo Lead's REST API endpoints to create leads in the Marketo. Following are the endpoints: http://developers.marketo.com/rest-api/lead-database/leads/#create_and_update First, you need to get authentication using method mentioned here ( http://developers.marketo.com/rest-api/lead-database/leads/#create_and_update ) then you can get custom form data and post that data on the endpoints mentioned above. Best Regards, Avtar Singh

Highlighted
Level 10 - Community Moderator

Re: How to submit custom form data using REST API

That endpoint really doesn't have anything to do with "form data," though.  You can't use the /lead.json endpoint alone for form data: you always need to hit either /lead.json and Associate Lead, or /push.json and Associate Lead.

You therefore must use 2 API calls for something that still falls short -- far short -- of the features of a real Filled Out Form activity within Marketo. So we discourage this approach in a professional environment. You shouldn't be using the REST API to process individual end-user form posts because you open a DoS vulnerability (an amateur can easily consume all your API calls in a half-hour if you expose them this way) and gain nothing in return.   Rather, you should be using the Forms 2.0 JS API on the client side to submit forms, and it can be integrated with any bespoke form.

Highlighted
Level 2

Re: How to submit custom form data using REST API

Thanks for your suggestion.. San..