Change a Lead’s Score via the REST API

February 19, 2015 | by

Let’s say you want to change a lead’s score in Marketo using the APIs. This is possible to do with the REST API using the Create/Update Lead endpoint.

Below is a code sample in Ruby that shows how to make this call.

In the JSON body of the request, we specify updateOnly as the action. This means the request will only work if the lead exists, otherwise it will fail. If you want to create a lead if one does not exist, then specify createOrUpdate as the action.

We use the lead’s email as the primary identifier to find the lead record in Marketo. Finally, we specify the value for the lead’s score using the key leadScore.

It possible to update 300 leads at time using this method. For more information, please see the Create/Update Lead endpoint.