Skip to main content
Credal | Documentation
current

Search documentation

Type to search this documentation.

Stream Message

POST/v0/copilots/streamMessageStream Message

Deprecated. Use the [v1 Agents API](/api-reference/v-1/api-reference/agents) 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.

Request body

application/json
object
conversationIdstring · uuid

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.

copilotIdstring · uuidrequired

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

emailstringrequired

The user profile you want to use when sending the message.

inputVariablesarray of object

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

Show child attributes
Show array items
idsarray of string · uuidrequired
Show child attributes
namestringrequired
messagestringrequired

The message you want to send to your agent.

Example request
{
  "conversationId": "00000000-0000-0000-0000-000000000000",
  "copilotId": "00000000-0000-0000-0000-000000000000",
  "email": "string",
  "inputVariables": [
    {
      "ids": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "name": "string"
    }
  ],
  "message": "string"
}

Responses

200This 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.text/event-stream
valuecopilots_StreamingChunk

StreamingChunk

oneOf · 6 options
Option 1object
conversationIdstringrequired
dataFiltersobject
Show child attributes
filteredDataSourcesPerCollectionarray of objectrequired
Show child attributes
Show array items
collectionIdstring · uuidrequired
filteredDataIdsarray of string · uuidrequired
Show child attributes
filtersarray of valuerequired
Show child attributes
Show array items
oneOf · 4 options
Option 1object
fieldstringrequired
fieldTypestringrequired

Discriminator value: string

one of "string"

operatorstringrequired

one of "<", ">", "<=", ">=", "!=", "==", "contains"

valuestringrequired
Option 2object
fieldstringrequired
fieldTypestringrequired

Discriminator value: number

one of "number"

operatorstringrequired

one of "<", ">", "<=", ">=", "!=", "==", "contains"

valueintegerrequired
Option 3object
fieldstringrequired
fieldTypestringrequired

Discriminator value: boolean

one of "boolean"

operatorstringrequired

one of "=="

valuebooleanrequired
Option 4object
fieldstringrequired
fieldTypestringrequired

Discriminator value: datetime

one of "datetime"

operatorstringrequired

one of "<", ">", "<=", ">=", "!=", "==", "contains"

valuestring · daterequired
semanticSearchTermsarray of stringrequired
Show child attributes
webSearchTermarray of stringrequired
Show child attributes
eventstringrequired

Discriminator value: initial

one of "initial"

warningsarray of stringrequired
Show child attributes
webSearchResultsarray of objectrequired
Show child attributes
Show array items
contentsstringrequired
titlestringrequired
urlstringrequired
Option 2object
chunkstringrequired
eventstringrequired

Discriminator value: data_chunk

one of "data_chunk"

Option 3object
eventstringrequired

Discriminator value: end_of_message

one of "end_of_message"

Option 4object
eventstringrequired

Discriminator value: final_chunk

one of "final_chunk"

sourcesarray of objectrequired
Show child attributes
Show array items
externalResourceIdobjectrequired
Show child attributes
externalResourceIdstringrequired
resourceTypestringrequired

one of "GOOGLE_DRIVE_ITEM", "MICROSOFT_DRIVE_ITEM", "ZENDESK_TICKET", "ZENDESK_ARTICLE", "ZENDESK_GROUP", "ZENDESK_ARTICLE_SECTION", "ZENDESK_ARTICLE_CATEGORY", "CONFLUENCE_PAGE", "CONFLUENCE_SPACE", "JIRA_TICKET", "JIRA_PROJECT", "SALESFORCE_TASK", "BOX_FILE", "BOX_FOLDER", "NOTION_PAGE", "NOTION_DATABASE", "SLACK_CHANNEL", "MONGO_COLLECTION_SYNC", "UNKNOWN"

idstringrequired
namestringrequired
urlstring
Option 5object
blocksarray of stringrequired
Show child attributes
conversationIdstring · uuidrequired
eventstringrequired

Discriminator value: blocked

one of "blocked"

warningsarray of stringrequired
Show child attributes
Option 6object
errorobjectrequired
Show child attributes
messagestringrequired
eventstringrequired

Discriminator value: error_chunk

one of "error_chunk"

Example response
{
  "blocks": [
    "string"
  ],
  "conversationId": "00000000-0000-0000-0000-000000000000",
  "event": "blocked",
  "warnings": [
    "string"
  ]
}
Documentation menu