Skip to main content

Send Chat Message

POST 

/api/chat/message

This endpoint sends a message to a specified conversation within a workspace. The request must include a valid API key and user ID.

Request

Header Parameters

    x-api-key stringrequired

    API key to authorize the request.

    userId stringrequired

    ID of the user making the request.

Body

required

    workspaceId stringrequired

    ID of the workspace.

    conversationId stringrequired

    ID of the conversation.

    message string

    The message to be sent.

    agentId string

    ID of the agent, if applicable. Example - agenframe

    disableMemory boolean

    Flag to disable memory usage.

    isFirst boolean

    Indicates if this is the first message in the conversation.

Responses

Successfully sent the message and retrieved follow-up questions and source snippets.

Schema

    data

    object

    id string

    The ID of the response.

    query string

    The query that was sent.

    agentid stringnullable

    ID of the agent if applicable.

    createdat date-time

    Timestamp when the response was created.

    dislikes string[]
    likes string[]
    rootAgentName string

    Name of the root agent handling the query.

    stepsBreakdown

    object[]

  • Array [

  • agentname string

    Name of the agent handling the step.

    content object

    Content and responses from the agent.

    external string

    External source used for the step.

    step_id string

    Unique identifier for the step.

    type string

    Type of step (e.g., 'rag').

  • ]

  • suggested_files string[]nullable

    followUps

    object

    id string

    Unique identifier for the follow-up group.

    questions string[]

    sourceSnips

    object[]

  • Array [

  • chunkid string

    ID of the source chunk.

    content string

    Extracted content snippet.

    displaytext string

    Short preview of the snippet.

    filename string

    Name of the source file.

    filetype string

    Type of the source file.

    url string

    URL of the source document.

  • ]

  • type string

    The type of the message, which is 'response'.

Loading...