SOLVED

Re: Push API To Create Lead

Go to solution
touseefwasil
Level 1

Hi All,

 

I am new to API's. I am looking for complete syntax of API to create single or multiple leads in Marketo Database.

 

Note: Sending calls via browser only for now so please provide syntax accordingly.

 

Regards,

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator
What is your question?

The Push Lead endpoint is well-documented.

It cannot be called from a web page because of CORS restrictions. If you have a demo page to the contrary, please provide a link to such a page.

View solution in original post

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

You cannot use the browser to call the REST API. So please start with a proper development environment.

 

Also, it’s best to explain exactly what you’re trying to achieve, describing your fuller environment, rather than leaping to a specific API endpoint. Otherwise we may have an XY Problem.

Touseef
Level 2

Thankyou for replying.

As of now I dont have proper development environment. But I used below URL to access lead from Marketo Database and its working.

<Rest URL>/v1/lead/LeadID.json?access_token=<access_token>

Same way I request url syntax to create lead in Marketo instance database.

Touseef
SanfordWhiteman
Level 10 - Community Moderator
What is your question?

The Push Lead endpoint is well-documented.

It cannot be called from a web page because of CORS restrictions. If you have a demo page to the contrary, please provide a link to such a page.
Touseef
Level 2

I guess that's why not able to access as I am trying to call via browser. Will try again after setting up environment. Thankyou

Touseef
SanfordWhiteman
Level 10 - Community Moderator
Yes. But it would still be good if you'd explain exactly what you're trying to accomplish in business terms.

It seems weird to be building your first API-consuming app without explaining what it's supposed to do – and, among many other concerns, considering where it's going to be hosted.