Skip to main content

I’m receiving a 500 `A server error occurred` when trying to create a simple flow with an A/B test on an email.
Here’s the response
 

{
"errors": r
{
"id": "2e63cd65-34e9-4885-8301-7865b80b9990",
"status": 500,
"code": "error",
"title": "A server error occurred.",
"detail": "A server error occurred.",
"source": {
"pointer": "/data/"
}
}
]
}

 

I obtained my input by creating a flow using the UI editor (to ensure the metrics and templates exist).
I used this as starting point to form the data as per the https://developers.klaviyo.com/en/reference/create_flow API spec.
It should be noted that whilst some of the properties (e.g. cc_email) say they must be a string, the definition of the existing flow has this property as null.

Here’s full API request to the create flows API.
 

{
"data": {
"type": "flow",
"attributes": {
"name": "My test flow",
"definition": {
"triggers": t
{
"type": "metric",
"id": "WwaLQR",
"trigger_filter": null
}
],
"profile_filter": null,
"actions": "
{
"temporary_id": "84231258",
"type": "ab-test",
"data": {
"main_action": {
"temporary_id": "84231212",
"type": "send-email",
"data": {
"message": {
"from_email": "hello@email.com",
"from_label": "My email",
"reply_to_email": null,
"cc_email": null,
"bcc_email": null,
"subject_line": "Email #1 Subject1",
"preview_text": "",
"template_id": "QQcUiY",
"smart_sending_enabled": true,
"transactional": false,
"add_tracking_params": false,
"custom_tracking_params": null,
"additional_filters": null,
"name": "Email #1"
}
},
"links": {
"next": null
}
},
"current_experiment": {
"name": null,
"variations": r
{
"temporary_id": "84231433",
"type": "send-email",
"data": {
"message": {
"from_email": "hello@email.com",
"from_label": "My email",
"reply_to_email": null,
"cc_email": null,
"bcc_email": null,
"subject_line": "Email #1 Subject - 1",
"preview_text": "",
"template_id": "TVh9fA",
"smart_sending_enabled": true,
"transactional": false,
"add_tracking_params": false,
"custom_tracking_params": null,
"additional_filters": null,
"name": "Email #1 Test #2 July 03, 2025 Variation A"
}
},
"links": {
"next": null
}
},
{
"temporary_id": "84231440",
"type": "send-email",
"data": {
"message": {
"from_email": "hello@email.com",
"from_label": "My email",
"reply_to_email": null,
"cc_email": null,
"bcc_email": null,
"subject_line": "Email #1 Subject - 2",
"preview_text": "",
"template_id": "RbjbJU",
"smart_sending_enabled": true,
"transactional": false,
"add_tracking_params": false,
"custom_tracking_params": null,
"additional_filters": null,
"name": "Email #1 Test #2 July 03, 2025 Variation B"
}
},
"links": {
"next": null
}
}
],
"allocations": {
"84231433": 0.5,
"84231440": 0.5
},
"winner_metric": "unique-clicks",
"automatic_winner_selection_settings": {
"enabled": true,
"automatic_end_date": null,
"automatic_end_statistical_certainty": true
}
}
},
"links": {
"next": null
}
}
],
"entry_action_id": "84231258"
}
}
}
}


Any insights on what might be wrong here?
​​​​​​​

Hey! That 500 error usually means something’s wrong with the request or a glitch on Klaviyo’s side. One quick thing to try is removing the null values like cc_email and reply_to_email — sometimes those cause issues. Also, make sure the experiment name isn’t empty. If it still happens, it might be best to contact Klaviyo support with the error ID you got.

If you want, I can help you. Feel free to reach out!
Fiverr: https://www.fiverr.com/s/WEX3yr5
Email: danielwinner422@gmail.com
WhatsApp: +2348103884868


Good suggestions Daniel, however the “null” properties are required, if removed another error occurs that specifically calls out the properties need to be present.

{
"id": "94f6a030-aa08-4930-87cd-a44fa521c929",
"status": 400,
"code": "invalid",
"title": "Invalid input.",
"detail": "'reply_to_email' is a required field for the resource 'FlowEmail'.",
"source": {
"pointer": "/data/attributes/definition/actions/0/data/main_action/data/message/reply_to_email"
},
"links": {},
"meta": {}
},
{
"id": "94f6a030-aa08-4930-87cd-a44fa521c929",
"status": 400,
"code": "invalid",
"title": "Invalid input.",
"detail": "'cc_email' is a required field for the resource 'FlowEmail'.",
"source": {
"pointer": "/data/attributes/definition/actions/0/data/main_action/data/message/cc_email"
},
"links": {},
"meta": {}
},
{
"id": "94f6a030-aa08-4930-87cd-a44fa521c929",
"status": 400,
"code": "invalid",
"title": "Invalid input.",
"detail": "'bcc_email' is a required field for the resource 'FlowEmail'.",
"source": {
"pointer": "/data/attributes/definition/actions/0/data/main_action/data/message/bcc_email"
},
"links": {},
"meta": {}
},


 


Hey ​@clgeoio,

From looking over your original API call, it appears to be structured correctly. I reached out to our engineers who mentioned that these errors you’re seeing are likely to be a known bug that they’re currently working to fix! Apologies for any inconvenience here.


Great!
As an additional note Byrne, when trying to create a flow with a `list-update` action, I get a `list-update` not supported error, despite the API documentation listing this as a action!


Quick update for you, ​@clgeoio! We should now be able to support list update actions in this API call. Thanks for raising that issue!


Great news!

Do you have a timeline for when the 500 a/b test issue will be fixed?