Stream Message

Deprecated

Deprecated. Use the v1 Agents API instead: send a message with POST /v1/agents/sendMessage, then poll for the response with GET /v1/agents/fetchAgentResponse.

Previously, this endpoint streamed a response back as Server-Sent Events.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
copilotIdUUIDRequired

Credal-generated Agent ID to specify which agent to route the request to.

messagestringRequired
The message you want to send to your agent.
emailstringRequired
The user profile you want to use when sending the message.
conversationIdUUIDOptional

Credal-generated conversation ID for sending follow up messages. Conversation ID is returned after initial message. Optional, to be left off for first messages on new conversations.

inputVariableslist of objectsOptionalBeta
Optional input variables to be used in the message. Map the name of the variable to a list of urls.

Response

This endpoint returns a stream of server sent events. These can be in two formats - one is an initial event, followed by multiple data chunks, followed by a final chunk, or the other format is just one blocked event. See the examples for more details.

initialobject
OR
data_chunkobject
OR
end_of_messageobject
OR
final_chunkobject
OR
blockedobject
OR
error_chunkobject