Stream Message
BetaThis endpoint allows you to send a message to a specific agent and get the response back as a streamed set of Server-Sent Events.
Headers
Authorization
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
copilotId
Credal-generated Agent ID to specify which agent to route the request to.
message
The message you want to send to your agent.
email
The user profile you want to use when sending the message.
conversationId
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.
inputVariablesBeta
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.
initial
OR
data_chunk
OR
end_of_message
OR
final_chunk
OR
blocked
OR
error_chunk