Start a new chat

Use this API to start a new chat conversation using the Rolkol Chat Agent from your backend.

POST https://api.rolkol.com/api/v1/chatbot/

The above endpoint initiates a single chat. Do note that the system uses two methods to identify a chat.

HEADERS

Parameter
Type
Description

x-api-key

String

API key associated with your project

required

Body Parameter

Parameter
Type
Description

workspaceId

String

The ID associated with a workspace.

required

assistantId

String

The ID associated with an assistant.

required

userIdentifier

String

A unique identifier associated with the user or customer initiating the conversation. This identifier is crucial for tracking and storing individual conversation histories. It allows you to maintain context across multiple interactions with the same user. Example: “user12345” or “[email protected]

required

question

String

The user’s query or prompt that is submitted to the LLM. The LLM will use this question to generate a relevant response.

required

attributes

Object

The attributes parameter is an optional JSON object that allows you to provide additional contextual information or metadata with your API request. This can be used for various purposes, you can use this to pass user or customer details like firstName, lastName, or any other relevant information to personalize the interaction.

optional

RESPONSE BODY

Parameter
Type
Description

response

String

Response from AI

conversationId

String

The ID associated with the conversation.

Last updated