Open a user-delegated agent DM channel

Creates or reuses a human-to-agent DM channel and channel-linked session for the authenticated OAuth user. If content is supplied and createOnly is not true, the first message is posted as that user.

Authentication

AuthorizationBearer

Tenant/app API key or OAuth/JWT bearer token.

Headers

X-CES-Workspace-IDstringOptionalformat: "^ws_[A-Za-z0-9_-]+$"
Optional Workspace runtime selector header. If supplied with workspaceId, both values must match.

Query parameters

workspaceIdstringOptionalformat: "^ws_[A-Za-z0-9_-]+$"

Optional Workspace runtime selector for preview or validation calls. If supplied with X-CES-Workspace-ID, both values must match.

Request

This endpoint expects an object.
agentIdstringRequired
contentstringOptional
Optional initial user message.
createOnlybooleanOptionalDefaults to false
When true, open the DM channel without posting content.
messageIdstringOptional

Optional caller-provided idempotency/message id.

attachmentslist of maps from strings to anyOptional
pageContextmap from strings to anyOptional

Response

DM channel created or resolved
channelIdstring
sessionIdstring
createdboolean
messageIdstring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error