Skip to main content
Solved

Error 500 after subscription request


Forum|alt.badge.img

Hello!

 

I use the /client/subscriptions endpoint to add a profile to a list, but after requesting the endpoint I receive an error 500: 

"status":500,"code":"error","title":"A server error occurred.","detail":"A server error occurred.","source":{"pointer":"/data/"}

 

What can I do?

Other question, when a user consent for a list, can we send him a SMS for example from a flow?

Best answer by Byrne C

Hi ​@AlexAIT,

Happy to answer both your questions! You mention that on your platform, people can consent to SMS, even if they don’t provide their phone number. While it’s totally fine to have that in your terms of service, and customers are allowed to agree to this, Klaviyo can’t provide SMS consent to somebody who doesn’t have a phone number. That’s not possible in our system at this time.

When you make this API call, are you subscribing people to a specific list, and including that list’s ID? Also, is that list double opt-in? If you’re subscribing people to a list that’s double opt-in, they’ll receive an email asking them to confirm their subscription before they are officially subscribed. That might be why you’re seeing this profile as Never subscribed. You can check if a list is double opt-in in the consent tab in that list’s settings.

Also, are 500 errors still occurring? These usually refer to errors on Klaviyo’s end, so they’re sometimes worth trying again, while making sure that your call is structured correctly, and you’re using an up-to-date revision.

If you have any follow-up questions regarding the above, please let me know!

-Byrne

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

Forum|alt.badge.img+4
  • Problem Solver III
  • 25 replies
  • March 19, 2025

1. Error 500 on /client/subscriptions Endpoint:

 

A 500 Internal Server Error typically means an issue on the server side. Here's what you can do:

 

- Check API Request: Ensure your request is correctly formatted with valid headers and body.

- Verify API Key: Double-check your API key and authentication setup.

- Server-Side Issue: Check Klaviyo's status page or contact their support to see if there's a known issue.

- Data Integrity: Ensure all required data (e.g., email or phone number) is included and correct.

 

2. Sending SMS After User Consent:

 

Yes, you can send SMS in a flow after a user opts in. Here's how:

 

- Ensure Consent: Users must opt in to receive SMS (via checkbox or double opt-in).

- Set Up Flow: In Klaviyo, create a flow with an SMS action to send messages after a trigger (e.g., sign-up or abandoned cart).

- Check SMS Settings: Make sure your SMS is configured, and you have a valid phone number.

 

Let me know if you need further help!


Forum|alt.badge.img
  • Author
  • Contributor I
  • 2 replies
  • March 19, 2025

Thanks for your answer!

Im quite sure about my headers etc.. because the first try and error from this endpoint was my Company ID + revision, then the correct data payload.
Once everything was correct, I received the 500.

I also tried with the validation of data (add the consent email if user put the email) but in our terms, the user consent for Email and SMS, even if he doesn’t put an phone number (he can add it later in the process) so technically, I should be able to save the consent for mail and sms even if both data are not here :/ 

I cannot contact Klaviyo status because im on free plan. I would like to test and to be sure that I can do everything I need with Klaviyo before paying for a plan.

 

A bit stuck


Forum|alt.badge.img
  • Author
  • Contributor I
  • 2 replies
  • March 19, 2025

I updated a bit my global object by adding an email and removing the consented_at key (maybe klaviyo have difficulties to manage the dates) but now my other problem is that it seams that the request pass, but on the profile the value for “Email” for exemple is still “Never subscribed”

 

My object:
{ email: { marketing: { consent: 'SUBSCRIBED' } } }


Byrne C
Community Manager
Forum|alt.badge.img+17
  • Community Manager
  • 158 replies
  • Answer
  • March 19, 2025

Hi ​@AlexAIT,

Happy to answer both your questions! You mention that on your platform, people can consent to SMS, even if they don’t provide their phone number. While it’s totally fine to have that in your terms of service, and customers are allowed to agree to this, Klaviyo can’t provide SMS consent to somebody who doesn’t have a phone number. That’s not possible in our system at this time.

When you make this API call, are you subscribing people to a specific list, and including that list’s ID? Also, is that list double opt-in? If you’re subscribing people to a list that’s double opt-in, they’ll receive an email asking them to confirm their subscription before they are officially subscribed. That might be why you’re seeing this profile as Never subscribed. You can check if a list is double opt-in in the consent tab in that list’s settings.

Also, are 500 errors still occurring? These usually refer to errors on Klaviyo’s end, so they’re sometimes worth trying again, while making sure that your call is structured correctly, and you’re using an up-to-date revision.

If you have any follow-up questions regarding the above, please let me know!

-Byrne