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.
The Content-Type header is used to indicate the media type of the resource. The media type is a string sent along with the file indicating the format of the file. For example, for image file its media type will be like image/png or image/jpg, etc. In response, it tells about the type of returned content, to the client.
Definition of a Content Type. In technical terms, a Content Type is a reusable collection of metadata for a category of content, with its corresponding taxonomies that allows you to manage information in a centralized, reusable way.
The content type status, part of an HTTP header, can tell a browser what type of content, e.g. a PNG image or an HTML page, is being transmitted. This will affect the way a browser will process the file.
The default content type is usually “application/octet-stream” with the most generic MIME/type definition. The MIME/type is appropriate for any content type a web server is likely to serve.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With