Skip to navigation

Create response (streaming)

View as Markdown

Creates a response and streams updates in real-time via Server-Sent Events (SSE). This provides a real-time alternative to creating a response and polling the GetResponse endpoint.

If the conversation is handed off to live chat, the turn is relayed to the human agent rather than the assistant, so the stream emits RESPONSE_CREATED then RESPONSE_COMPLETED with no outputs and closes, with no RESPONSE_IN_PROGRESS or RESPONSE_OUTPUT_DELTA between them. The agent’s reply arrives separately, as a LIVE_AGENT message on a response of its own, and is received like a proactive notification rather than on this stream.

Authentication

AuthorizationBearer

JWT bearer token authentication. Obtain an access token from the Moveworks auth endpoint and include it in the Authorization header as ‘Bearer <token>’.

Path parameters

conversation_idstringRequired

A base-62 identifier prefixed by a short resource type

Headers

Assistant-NamestringRequired
The Moveworks assistant identifier that was configured for your organization.
AcceptenumRequired

Must be set to text/event-stream to receive Server-Sent Events

Allowed values:

Request

This endpoint expects an object.
inputobjectRequired

Input for one turn. Set exactly one of chat, action, text or callback_id.

Response headers

x-trace-idstringOptional
A unique identifier used to trace your request within the Moveworks system

Response

Server-Sent Events stream of response updates

eventenum
Response streaming event type
dataobject

Event data payload (structure depends on event type)

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error