Attempting to send back in stock subscription over legacy API keeps failing...


I am attempting to send a back in stock subscription using the legacy API endpoint. I’m using the node fetch API and sending a POST request with the following code;


const formData = new URLSearchParams();
formData.append('a', KLAVIYO_PUBLIC_API_KEY);
formData.append('email', email);
formData.append('variant', variantId);
formData.append('platform', 'api');

const klaviyoRes = await fetch(`${KLAVIYO_BIS_API_URL}/subscribe`, {
method: 'POST',
headers: {
'content-type': 'application/x-www-form-urlencoded',
body: formData,


I keep getting a response back that this endpoint does not accept a GET request from Klaviyo. Anyone have a node implementation that works here or uses one of their SDK’s for this?


Best answer by Brian Turcotte 25 May 2023, 19:10

View original

3 replies

Userlevel 6
Badge +29

Hi @mrispoli,


I am going to check with Engineering on this one, and I will update the thread as soon as possible!





@Brian Turcotte any word from the engineering team?

Userlevel 6
Badge +29

Hi @mrispoli!

My apologies for the delay - would you be willing to provide the exact response you are receiving (with any sensitive information redacted)?

This would help myself/Engineering understand the issue a little better.

In the meantime, I would say that back in stock calls must be made in accordance with this guide:

To that end, I would recommend reading through that guide and double-checking that your API calls are structured thusly.