Chat message send via /conversations/v1/chats/{id} returns 400

Trying to send a canned response programmatically. The POST to /api/v2/conversations/v1/chats/{id}/messages with this payload fails with 400 Bad Request. No useful details in the error body. Tried changing the type to text too. Same result.

{
 "type": "agent",
 "text": "Testing"
}

What is missing?

The endpoint path is wrong. You’re mixing v2 and v1. It should be /api/v2/conversations/chats/{id}/messages. Also, the payload needs a to object with the participant ID. Try this:

{
 "to": { "id": "participant_id" },
 "text": "Testing"
}

Check the docs for the exact structure.