Search code examples
marketo

Why "Invalid Content Type"


Trying to update a data field on a lead record in Marketo. Using C#. I send:

{"action":"updateOnly","input":[{"email":"[email protected]","leadQuality":"Hot"}]}

And get back:

{"requestId":"d98e#14b2d7dd1f3","success":false,"errors":[{"code":"612","message":"Invalid Content Type"}]}

Why the Invalid Content type message? The field leadQuality is legit. The email address exists. I've tried a number of different fields and always the same message. Access token is good too.


Solution

  • Content-Type is a HTTP header. Usually, you set it to application/json for REST calls.

    You should do this in the code where you generate the HTTP request or REST call.

    I found text/json as Content-Type and Accept header value in one of the marketo examples. You might try one of the two choices.