Hey everyone,
Running into a snag trying to send a canned response during an active chat session using the Conversations API. I’ve got the session ID and everything looks good, but the POST request keeps failing with a 400 Bad Request.
Here’s the endpoint I’m hitting:
POST /api/v2/conversations/chat/sessions/{sessionId}/messages
And this is the payload I’m sending:
{
"text": "Thanks for waiting! I'll be right with you.",
"authorId": "12345678-abcd-efgh-1234-567890abcdef"
}
The error response is pretty vague:
{
"message": "Invalid request body",
"code": "bad.request",
"errors": []
}
I’ve double-checked the authorId and it matches the user logged into the platform. I even tried adding type: "text" to the payload but that didn’t help.
Is there a specific field I’m missing for canned responses? Or maybe the API endpoint is different for sending versus receiving messages?
Also, just to clarify, I’m using the standard OAuth token from my app credentials, not a user impersonation token. Not sure if that matters for message authoring.
Anyone else hit this?