Conversations API: Initiating cobrowse session via /api/v2/conversations

Hey folks,

Trying to kick off a cobrowse session programmatically using the Conversations API. We’ve got a web client that needs to trigger a session without the agent having to manually start it in the desktop app.

I’m hitting /api/v2/conversations with a POST request. The payload looks like this:

{
 "from": {
 "id": "agent-user-id",
 "type": "user"
 },
 "to": [
 {
 "id": "customer-contact-id",
 "type": "contact"
 }
 ],
 "type": "cobrowse",
 "session": {
 "id": "my-session-id-123"
 }
}

Getting a 400 Bad Request back. The error message is pretty generic: “Invalid request body.” I’ve double-checked that the user ID is valid and has the right permissions for cobrowse. The contact ID is from an existing webchat conversation.

Is the session.id supposed to be generated by us or returned by the API? I tried leaving it out but got a different error about missing required fields. Also, do I need to include any specific headers for the cobrowse protocol?

Any examples of a working payload for this endpoint would be great. Feels like I’m missing a step in the handshake.