Skip to main content
Vipin_Mp
Level 2
Dec 26, 2018 1:38 PM UTC
Question

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 ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

SanfordWhiteman
User Group Leader
User Group Leader
Dec 26, 2018 6:12 PM UTC

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.

Translate
Avtar_Singh1
Level 2
Dec 31, 2018 10:08 AM UTC

Hi Vipin, You can use Marketo Lead's REST API endpoints to create leads in the Marketo. Following are the endpoints: developers.marketo.com/rest-api/lead-database/leads/#create_and_update First, you need to get authentication using method mentioned here ( 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

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Dec 31, 2018 10:09 PM UTC

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.

Translate
Vipin_Mp
Vipin_MpAuthor
Level 2
Jan 10, 2019 6:51 AM UTC

Thanks for your suggestion.. San..

Translate