Is it possible to create new leads with REST API?

勝之_新保
Level 2

Is it possible to create new leads with REST API?

Attempted to create new leads  who created in external databases via api in list of marketo Lead Database.

But I can't find how to do this in the page. http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/...

According to the document, Bulk Leads is able to create new leads by converting to a csv file.

Is it possible to create new leads by not converting to a csv file but having body when post data ?

Please refer to the attached sample documnet.(use ajax when post data.)

In japanese.

外部DBで作成されているレコードをマルケトのLead Databaseにリストとして作成したDBにAPIを使って作成したいと思っています。

ただドキュメントを見る限りAPIでそういう操作はできないようにみえます。

Bulk Leadsはcsvをインポートするやり方でそれを可能にしていますが、csvではなくpostのbodyにデータを持たせて

マルケト内にデータを作成することはそもそも可能なのでしょうか?

イメージを添付しました。(ajax使用)

Tags (1)
2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to create new leads with REST API?

Push Lead will create new leads if there is not a matching dedupe key, using the JSON payload as described.

Anonymous
Not applicable

Re: Is it possible to create new leads with REST API?

As Sanford Whiteman​ noted, you can certainly create/update new leads with the (JSON) data in the payload. You can use the Push Lead API, though if all you're doing is an "upsert" you can just use the Sync Lead API:  http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/...

You can get more info and an example here: http://developers.marketo.com/rest-api/lead-database/leads/#create_and_update.