1 of 1 people found this helpful
2. Update the name to include this dash – via the "Update Program" card.
Think you mean "endpoint," never heard "card" used this way.
The problem with the API is the data should not be encoded but the header "Content-Type: application/x-www-form-urlencoded" encodes em dash only not the hyphen.
Actually the HTTP header doesn't encode anything at all.
The header is intended to reflect encoding that you have done elsewhere. Often, calling an encoding routine also sets the header accordingly, or vice versa. But there's no automatic connection between the 2 in general (and it's easy to mess up by stating the wrong encoding for the actual payload).
You don't need to URL-encode the "–". You can encode it (URL-encoded non-reserved characters always work) but you don't need to.
2. Update the name to include this dash – via the "Update Program" [API endpoint]
The api expects data to be sent with "Content-Type: application/x-www-form-urlencoded" Header.
I have no trouble at all including an emdash in the program name via the API.
The payload is just:
Content-Type: application/x-www-form-urlencoded; charset=utf-8
And it also works if the emdash is encoded:
It is a limitation on Marketo API
Nope. It's an error in your client code.
Thank you for your response Sanford, and my apologies for not promptly responding as you did. I was just able to take a look at this today, and I have forwarded this to my developer. I will come back and mark this answer as correct after the solution has been applied successfully.