---
title: "POST /record-chat-message/{chat_id}"
method: POST
path: "/record-chat-message/{chat_id}"
---

# POST /record-chat-message/{chat_id}

`POST /record-chat-message/{chat_id}`

## Request

- Base URL: `https://api.retellai.com`
- URL: `https://api.retellai.com/record-chat-message/{chat_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/retellai/apis/retell-sdk/docs/record-chat-message/:chat_id/post.ts> (a function with typed inputs; its response is checked against the schema)

Record a user or human transfer-target message in an ongoing escalated chat. SMS chats accept only transfer_target and send SMS before recording. API chats only record; delivery is the customer's responsibility. Idempotency keys are scoped to the organization. Successful results are retained for 24 hours. Concurrent requests with the same key wait for the lock. Reusing a key after success returns 200 with the original message_id and created_timestamp, without sending again. No duplicate-key error is raised. Failures are not cached and release the lock so the same key can be retried. Each execution makes one SMS send attempt. If delivery is uncertain or processing fails after sending, a retried request can send the SMS again and cause duplicates.

## Path parameters

- `chat_id` string, required

## Request body

- union
  - object
    - `role` 'user', required
    - `message` string, required
    - `idempotency_key` string, required
  - object
    - `role` 'transfer_target', required
    - `message` string, required
    - `idempotency_key` string, required
    - `metadata` object
      - `transfer_target_name` string

## Response `200`

Message recorded successfully.

- object
  - `message_id` string, required
  - `created_timestamp` integer, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `404`: Chat not found in this organization.
- `500`: Internal Server Error

## Changes

- **2026-11-08** `8d71e920aef6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/retellai/apis/retell-sdk/changes/record-chat-message/:chat_id/post.md)

---

[API](https://skmtc.dev/retellai/apis/retell-sdk.md) - [All operations](https://skmtc.dev/retellai/apis/retell-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/retellai/apis/retell-sdk/revisions/8fb291367cc8?raw)
