We’re trying to trigger a proactive web message to customers who had a session with us last week but didn’t convert. The goal is simple: send them a follow-up link. We’ve got the OAuth token sorted, but the API call keeps failing with a 400 Bad Request.
I’m using the /api/v2/conversations/webmessaging/notifications endpoint. The docs say you can specify a previousConversationId to link it to their history. Here’s the payload I’m sending:
{
"previousConversationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"notificationType": "PROACTIVE",
"content": {
"title": "Missed something?",
"body": "Come back and finish your order."
},
"recipient": {
"id": "user-12345",
"type": "EXTERNAL"
}
}
The error response is vague: "message": "Invalid notification payload". I’ve checked the previousConversationId multiple times. It’s definitely from a valid past conversation in the same division. The recipient.id is just a placeholder string for now since we don’t have a persistent user ID in the system yet, which might be the issue, but the docs don’t explicitly say it’s required for proactive sends.
I tried removing the previousConversationId and it worked, but then the message is orphaned and doesn’t show up in the agent’s history view when they pick it up. That defeats the whole purpose.
Is there a specific format for the recipient object when sending to a previous guest? Or does the previousConversationId need to be in a specific state? The conversation is closed, obviously. I’ve also tried passing a conversationId in the body instead of previousConversationId, but that throws a 409 Conflict saying the conversation is already ended.
Any ideas on what’s missing here?