---
title: "Finish an API-chat run"
method: POST
path: "/test_framework/v1/runs/{id}/end-chat/"
tags: ["Runs"]
---

# Finish an API-chat run

`POST /test_framework/v1/runs/{id}/end-chat/`

## Request

- Base URL: `https://api.cekura.ai`
- URL: `https://api.cekura.ai/test_framework/v1/runs/{id}/end-chat/`
- Auth: one of:
  - API key in header `X-CEKURA-API-KEY`
  - HTTP bearer
  - HTTP bearer
  - API key in header `X-VOCERA-SHAREABLE-LINK-TOKEN`
  - HTTP bearer

Finish an API-chat run

## Path parameters

- `id` integer, required

## Request body

- ApiChatFinish: Request body for POST /runs/{run_id}/end-chat/ (finish the chat).
  - `reason` string: Optional end reason, e.g. 'main_agent_ended_call'.

## Response `200`

- ApiChatFinishResponse: Response for POST /runs/{run_id}/end-chat/.
  - `run_id` integer, required
  - `result_id` integer, required
  - `status` string, required

## Changes

- **2026-11-03** `a6fb6a739212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cekura/apis/cekura-api/changes/test_framework/v1/runs/:id/end-chat/post.md)

---

[API](https://skmtc.dev/cekura/apis/cekura-api.md) - [All operations](https://skmtc.dev/cekura/apis/cekura-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cekura/apis/cekura-api/revisions/a6fb6a739212?raw)
