A 422 from Intercom usually means the event timestamp (created_at) is invalid. The value 1761447241 is far in the future — Intercom expects a Unix timestamp near the current time (seconds since 1970). Try using Math.floor(Date.now() / 1000) or a current timestamp, and the requests should succeed.
Thanks for weighing in!
But these are all valid Unix timestamps from last night…?
Your idea would suggest that all of my Intercom requests should be failing (and should have been failing for the past many years), but that is not the case. Most of our calls go through—I can see this in our logs and within Intercom itself.
For example, below I pasted a few that do consistently work (with timestamps computed in the same way as those that fail).
The ones that succeed and the ones that fail are consistent—it isn’t a random percentage that fail. The examples from my earlier post always fail. The ones I indicated below always succeed.
{
"event_name": "dataxyz-received",
"created_at": 1761446735,
"user_id": "xxx",
"metadata": {
"label": "xxx"
}
}
{
"user_id": "xxx",
"unsubscribed_from_emails": false,
"custom_attributes": {
"last_dataxyz_received_at": 1761446735,
"recipient": true
}
}
{
"event_name": "dataxyz-saved_draft",
"created_at": 1761446735,
"user_id": "xxx",
"metadata": {
"label": "xxx"
}
}
I figured it out: we hit the quota of 120 events. I archived a bunch of unused events, and now all the failures have stopped.
This error message could be a LOT clearer! Or documented somewhere more clearly, at least!