Is there a specific payload structure required to kick off a cobrowse session grammatically? I’m trying to automate the start of a cobrowse session from our backend service using the Conversations API, but I keep hitting a wall.
I’ve got the OAuth token sorted, and I can successfully create a regular voice conversation. But when I hit POST /api/v2/conversations with the cobrowse type, the server rejects it. Here’s the JSON payload I’m sending:
{
"type": "cobrowse",
"to": [{
"id": "user_12345",
"type": "user"
}],
"from": {
"id": "agent_67890",
"type": "user"
}
}
The response is a 400 Bad Request. The error message isn’t super helpful, just says “Invalid request body”. I’ve checked the docs, and cobrowse is listed as a valid conversation type.
I tried adding a wrapupCode field, thinking maybe it needed that for some reason, but that just made things worse. Am I missing a header? Or is the to array structure wrong for cobrowse specifically?
It’s weird because the UI handles this fine. Just can’t get the API to play ball. Running the requests from Sydney, so latency isn’t the issue here.