APIs & Integrations

Steve_N
Member

Getting error 415 when updating email subscription status

SOLVE

I'm trying to update subscription statuses of an email address. I get a "200 OK" returned from my http call, but when I check the API usage of my application I see the call has an error code of 415 beside it.
Does anyone know what error code 415 is?
The error code 415 does not seem to be documented.
Thx

1 Accepted solution
Steve_N
Solution
Member

Getting error 415 when updating email subscription status

SOLVE

415 is "Unsupported media type". Had to add a header to the http call "application/json".

View solution in original post

2 Replies 2
IsaacTakushi
HubSpot Employee
HubSpot Employee

Getting error 415 when updating email subscription status

SOLVE

Hi @Steve_N,

Correct. Many of the endpoints require the Content-Type: application/json header in the request. This is usually documented in the Method Details card near the top of an article.

Isaac Takushi

Associate Certification Manager
0 Upvotes
Steve_N
Solution
Member

Getting error 415 when updating email subscription status

SOLVE

415 is "Unsupported media type". Had to add a header to the http call "application/json".