---
title: "Create a test session"
method: POST
path: "/bot/{botId}/testSession"
tags: ["BotTesting"]
---

# Create a test session

`POST /bot/{botId}/testSession`

## Path parameters

- `botId` string, required

## Response `200`

Success

- TestSession
  - `leadId` string, nullable — The lead ID of the test session
  - `sourceId` string, nullable — The source ID of the test session

---

[API](https://skmtc.dev/closebot/apis/closebot-api.md) · [All operations](https://skmtc.dev/closebot/apis/closebot-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/closebot/closebot-api/revisions/da5f5fb58534/schema)
