APIs & Integrations

Dadams
HubSpot Employee
HubSpot Employee

Contacts API v1 - 415 Unsupported Media Type errors for requests missing the Content-Type header

What happened?

Last week, we made some infrastructure upgrades to the Contacts API. While this upgrade was mostly transparent, and didn't change the functionality of the API, this did change how the Content-Type request header is handled.

What changed?

While we've always listed the Content-Type header as a requirement, this wasn't previously enforced, so requests without that header could still succeed. As of last week, this header requirement is now being enforced, and any POST or PUT requests that do not include this header will result in a 415 Unsupported Media Type error.

If the request library that you're using doesn't automatically include the content-type header, you'll need to manually include it. Since this issue only affects the v1 version of the Contacts API, the header will need to be set to "Content-Type: application/json; charset=utf-8"

Please let us know if you have any questions by replying below.

0件の返信

0 コメント

この投稿にはまだ回答がありません

この投稿にはまだ回答が寄せられていません。しばらく経ってからもう一度ご確認ください。また、役に立つ情報をご存じの場合はぜひ回答を投稿してください。

投稿に回答する

回答の仕方についてご不明な場合は、コミュニティーのガイドラインをご覧ください。