---
title: "Persist a finished chat turn"
method: POST
path: "/api/v1/chats/{id}/turns"
tags: ["chat"]
---

# Persist a finished chat turn

`POST /api/v1/chats/{id}/turns`

## Path parameters

- `id` string, uuid, required

## Request body

- ChatTurnRequestDTO
  - `chatUpdate` object — Extra chat fields written alongside the turn
    - `callId` string, nullable — Provider call id, for voice chats
    - `externalSessionId` string, nullable — The originating provider's conversation id, when the chat has one
    - `feedbackRating` boolean, nullable — User thumbs up/down
    - `feedbackText` string, nullable — User free-text feedback
    - `status` 'pending' | 'active' | 'completed' | 'connected' — Chat lifecycle status
  - `messages` object[], required — The turn's messages, reconciled by `uiMessage.id`
    - `role` 'user' | 'assistant' | 'system', required — Author role of the message
    - `text` string, required — Plain-text projection of the message
    - `timestamp` string, date-time — Message time; defaults to now when omitted
    - `type` 'web_call' | 'text_chat' | 'phone_call' | 'whatsapp' | 'null', nullable — Channel type of the message
    - `uiMessage` object, required — Canonical AI SDK message; `id` is the idempotency key
      - `id` string, required — Stable message id — the idempotency key
  - `source` 'ai-sdk' | 'elevenlabs' | 'whatsapp', required — System that produced the chat
  - `titleFallback` string — Fallback title when generation yields nothing
  - `type` 'web_call' | 'text_chat' | 'phone_call' | 'whatsapp' — Type used when self-healing a missing chat

## Response `204`

---

[API](https://skmtc.net/wejam/apis/jam.md) · [All operations](https://skmtc.net/wejam/apis/jam/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wejam/jam/revisions/bd5a5f406bca/schema)
