Hey everyone,
I’m trying to kick off a cobrowse session programmatically using the Conversations API so I can inject the resulting sessionId into my OpenTelemetry spans for end-to-end tracing. The goal is to trace the user interaction from the moment they hit the ‘Help’ button in our web app through to the agent dashboard.
I’m making a POST request to /api/v2/conversations/cobrowse with the following JSON body:
{
"provider": "genesys",
"application": {
"name": "my-web-app",
"version": "1.0"
}
}
The API returns a 201 Created, which is good. However, the response body looks like this:
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"provider": "genesys"
}
There is no sessionId field. I need that specific identifier to link the OTel span context. The docs are vague on whether the id returned is the session ID or if I need to make another call to get it. I’ve tried passing the id as the session ID in my tracer, but the downstream events aren’t correlating correctly.
Is there a different endpoint I should be hitting? Or am I missing a header that forces the full session object to be returned?