---
title: "Create conversation session"
method: POST
path: "/conversation/{conversationId}/session/create"
tags: ["Conversation Session"]
---

# Create conversation session

`POST /conversation/{conversationId}/session/create`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/conversation/{conversationId}/session/create`
- Auth: HTTP bearer

Conversation tokens allow client-side applications to create a unique,
authenticated credential for each conversation. This token can be used
to interact with the conversation/{conversationId}/send,
conversation/{conversationId}/receive, and
conversation/{conversationId}/message/create routes. By creating an
individual token for each conversation, a client-side application is
able to directly access and manipulate the conversation through these
routes. Without conversation tokens, a client-side application would
need to authenticate and access conversation routes through a
server-side application, which can be more complex and require
additional infrastructure. By providing a way for client-side
applications to authenticate and access the conversation routes
directly, the token route simplifies the process of integrating with
the API and makes it more convenient for developers to build AI
applications.

## Path parameters

- `conversationId` string, required: The ID of the conversation

## Request body

- object
  - `durationInSeconds` number: The maximum amount of time this session will stay open

## Response `200`

The session was created successfully

- object
  - `id` string, required: The ID of the conversation
  - `token` string, required: The token for this conversation
  - `expiresAt` number, required: The time the token will expire in milliseconds

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
