Skip to main content
Solved

inconsistent Create Event API behaviour with different email addresses


Forum|alt.badge.img

I’ve been doing some work on migrating from revision 2023-02-22 to the latest 2024-05-15 and i have it all re-factored into the new structure and it’s working as expected.

However, if for example I have the following in my data...

"profile": {
  "data": {
    "type": "profile",
    "attributes": {
      "email": "test@test.com"
    }
  }
},

...the response is 202 Accepted, but the event itself is not being added to Klaviyo, it’s just going missing…. this is a bit problem for us.

 

I’ve played around, and `test2@test.com` works…. but test@test.com doesn’t,

Also, example@example.com doesn’t show up….

 

All of these api calls are giving me 202 Accepted, but it seems to be hit and miss if it adds them in Klaviyo.

 

I’ve purged profiles, tried to clean it all out to see if some clashes are happening… it just seems really flakey…. am I missing something? is it me? or a bug….. ?

Best answer by Kim Strauch

Hey @StephenP, thanks for bringing this to our attention! It appears that we do block certain email addresses within our event pipeline (e.g. those with @example.com, and a subset of @test.com emails). These are not going to be real email addresses so there aren’t great use cases for allowing these to clog up a Klaviyo account. 

We’ll work to get our documentation updated to reflect that these are currently accepted by the API with a 202 but get dropped silently in the background. 

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

6 replies

Forum|alt.badge.img
  • Author
  • Contributor II
  • 4 replies
  • June 24, 2024

extra note:

if I go into Klaviyo and get the profile ID of the email test@test.com and make a create event api call using the ID as the profile identifier, it works.

 

Just seems to be unhappy with some email addresses...


Forum|alt.badge.img+1
  • Problem Solver I
  • 3 replies
  • June 24, 2024

You didn't give enough specifics but my intuition says it's related to:

https://developers.klaviyo.com/en/reference/events_api_overview#deduping-behavior
 

If you attempt to create multiple events for a profile with the same metric and timestamp (same time or the time is not specified), only one of those events will be processed and the others will be dropped as duplicates.

 

 


Forum|alt.badge.img
  • Author
  • Contributor II
  • 4 replies
  • June 25, 2024

Hey @kweiNRINC 

I am using the `unique_id` property to create distinct events… so don’t see the deduping being the issue here.

How could I be more specific?

 

Here is my entire data object… 

{
    "data": {
        "type": "event",
        "attributes": {
            "unique_id": "generated randomly",
            "metric": {
                "data": {
                    "type": "metric",
                    "attributes": {
                        "name": "Quote Reminder"
                    }
                }
            },
            "profile": {
                "data": {
                    "type": "profile",
                    "attributes": {
                        "email": "test@test.com"
                    }
                }
            },
            "properties": {
                ...
            }
        }
    }
}

 


Forum|alt.badge.img
  • Author
  • Contributor II
  • 4 replies
  • June 25, 2024

Strangely, I’ve just had a response from support and they’ve said:

 


It is expected to see a 202 response since the call was properly formatted, however, the issue comes down to Klaviyo not accepting emails that include "@test.com" or "example.com". While these email addresses are technically valid, we do not accept them into our event or profile processing pipeline.

 

… however, I was just able to post random_user@test.com … and it worked….


Kim Strauch
Klaviyo Employee
Forum|alt.badge.img+9
  • Klaviyo Employee
  • 91 replies
  • Answer
  • June 27, 2024

Hey @StephenP, thanks for bringing this to our attention! It appears that we do block certain email addresses within our event pipeline (e.g. those with @example.com, and a subset of @test.com emails). These are not going to be real email addresses so there aren’t great use cases for allowing these to clog up a Klaviyo account. 

We’ll work to get our documentation updated to reflect that these are currently accepted by the API with a 202 but get dropped silently in the background. 


Forum|alt.badge.img
  • Author
  • Contributor II
  • 4 replies
  • June 28, 2024

@Kim Strauch thanks for the clarification.

I understand the emails in question are pretty useless as they are invalid and can’t receive emails but it was just worrying me as to why when I raised the events with the API I didn’t see them being logged in the metrics.

As I’m sure you appreciate, understanding the why some were not being logged is very important.

I can sleep easy again now :), thank you.