Skip to content

Create Conversation

Create a conversation with context.

POST /conversations


context object Required

An object used to scope the conversation to a specific context—commonly used for multi-tenant filtering. Each key-value pair can be used to apply data filters across your schema. For example, pass {"organisationId": 1} to ensure that queries only use data from that organisation to inform responses. This assumes a context filter has been configured on relevant tables.


Request
import Inconvo from "@inconvoai/node";
const inconvo = new Inconvo({
apiKey: process.env.INCONVO_API_KEY
});
const conversation = await inconvo.conversations.create({
context: {
organisationId: 1
}
});
console.log(conversation);
Response
{
"id": "2c4d3456-e1f7-4d36-a8fd-f5cf15491d00"
}
curl -X POST "https://app.inconvo.ai/api/v1/conversations" \
-H "Authorization: Bearer $INCONVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"context": {"organisationId": 1}}'
Response
{
"id": "2c4d3456-e1f7-4d36-a8fd-f5cf15491d00"
}