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 stringrequired

    The message to be sent.

    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.

    followUps

    object[]

  • Array [

  • id string

    The ID of the follow-up question.

    text string

    The text of the follow-up question.

  • ]

  • sourceSnips

    object[]

  • Array [

  • id string

    The ID of the source snippet.

    text string

    The text of the source snippet.

  • ]

  • likes string[]
    dislikes string[]
    type string

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

Loading...