Running into a persistent 400 Bad Request when trying to inject a canned response into an active chat session via the Conversations API. The goal is to automate replies while maintaining distributed tracing context, but the request keeps getting rejected before it even hits the backend service.
Here’s the payload structure I’m sending to POST /api/v2/conversations/messaging/{conversationId}/messages:
{
"toContactId": "contact-uuid-here",
"type": "text",
"content": "This is a canned response test."
}
The headers include the standard OAuth bearer token and the traceparent for OpenTelemetry propagation. The call returns immediately with:
{
"code": "bad.request",
"message": "Invalid message content type or format."
}
I’ve verified the contactId is valid by hitting GET /api/v2/conversations/messaging/contacts/{id} beforehand. The session is active, not archived.
What’s weird is that if I change the type to something else or strip the content, the error message shifts, suggesting the endpoint is parsing it but rejecting the schema. I’ve checked the latest Swagger spec for MessagingMessageRequest, and this looks correct.
Is there a specific subType or contentType field required for canned responses that isn’t documented in the standard schema? Or is the API rejecting this because the user agent isn’t recognized as a platform component?
The trace span shows the request reaching the API gateway but failing validation. No 5xx errors, just strict validation rejection.
Also, the timezone on the server logs is UTC, so I’m accounting for that in my trace timestamps. The issue seems purely structural.
Anyone else hit this wall with programmatic chat messaging? The docs are thin on the exact JSON shape for non-standard message types. I’m stuck on whether I need to wrap the text in a specific object or if the type field needs a different value for canned content.
The error doesn’t give much more detail than “Invalid message content type”. I’ve tried application/json and text/plain in the header with no luck.
Just need to get this payload through so I can verify the trace context survives the injection. The span is creating fine locally, but if the API rejects it, the propagation chain breaks.
Any pointers on the exact JSON structure expected for this endpoint? I’m out of ideas on what the validator is looking for. The schema seems to allow it, but the runtime disagrees.