Using lead ids for a custom activity | Community
Skip to main content
LeaCharnley
New Participant
July 10, 2023
Question

Using lead ids for a custom activity

  • July 10, 2023
  • 1 reply
  • 680 views

How does the back end code for a custom activity gain a lead id for an existing lead record in Marketo? My dev and I have scoured loads of documentation, but all the examples we've seen only show a lead id hard-coded in. How can the API retrieve this information?

Thanks

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

1 reply

Darshil_Shah1
Community Manager
July 10, 2023

I'm assuming you're talking about the Add Custom Activities endpoint. FYR, custom activities are created using Add/Create Activities POST API call -- this API endpoint use the leadid as the primary arrtibute to associate the CA records to the know people in the Marketo database. Activities are always related back to the lead record via the leadId, corresponding to the Id field of the record. You either need to hard code it or GET using the leads API endpoint first and then use it in the add activities POST endpoint