Marketo API: 1004 Error

Aaron_Startksto
Level 1

Marketo API: 1004 Error

I am receiving a "1004" error saying a lead is not found when trying to POST to Marketo. I can confirm this lead exists in our Marketo instance, and we even send a GET request beforehand to ensure the lead exists. I've also confirmed the fields we're trying to update exist in Marketo. What is the best way to troubleshoot this?

3 REPLIES 3
Jep_Castelein2
Level 10

Re: Marketo API: 1004 Error

This error wouldn't be related to the fields. Likely, there is an issue with the payload. Have you specified the lookupField? Is your action 'updateOnly'? In the payload, are there any leading or trailing spaces? Any special characters that could cause encoding issues (like '+')? I would also double-check that you are connecting to the correct Marketo instance (I assume so, but just in case).

Aaron_Startksto
Level 1

Re: Marketo API: 1004 Error

Turns out our production instance required the lookupField to be set, but our sandbox environment did not. I appreciate the quick troubleshooting help!

Is this something that can be configured through the UI to not require a lookupField in API requests? I'm curious why this would be different per environment.

Jep_Castelein2
Level 10

Re: Marketo API: 1004 Error

Aaron Startkston‌ the lookupField should default to 'email' if not set. That should not be different across Marketo instances.