---
title: "Create Message Route"
method: POST
path: "/api/threads/{thread_id}/messages/"
tags: ["message"]
---

# Create Message Route

`POST /api/threads/{thread_id}/messages/`

Creates a new message.

## Path parameters

- `thread_id` string, uuid, required

## Request body

- MessageCreateInput
  - `role` 'user' | 'assistant', required
  - `content` string, required
  - `metadata` MessageMetadataInput, required
    - `original_llm_response` string, nullable
    - `trustworthiness_score` number, nullable
    - `trustworthiness_explanation` string, nullable
    - `is_expert_answer` boolean, nullable
    - `is_bad_response` boolean, nullable
    - `guardrailed` boolean, nullable
    - `escalated_to_sme` boolean, nullable
    - `citations` string[], nullable
    - `scores` object, nullable

## Response `201`

Successful Response

- Message
  - `thread_id` string, uuid, required
  - `role` 'user' | 'assistant', required
  - `content` string, required
  - `metadata` MessageMetadataOutput, required
    - `original_llm_response` string, nullable
    - `trustworthiness_score` number, nullable
    - `trustworthiness_explanation` string, nullable
    - `is_expert_answer` boolean, nullable
    - `is_bad_response` boolean, nullable
    - `guardrailed` boolean, nullable
    - `escalated_to_sme` boolean, nullable
    - `citations` string[], nullable
    - `scores` object, nullable
  - `id` string, uuid, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `deleted_at` string, date-time, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2025-08-05** `9e6009a931b6` — 1 breaking, 11 info
  - removed `#/components/schemas/ResponseScoreMetadata-Input` from the `metadata/anyOf[subschema #1: MessageMetadata]/scores` request property `anyOf` list
  - added the new optional request property `metadata/anyOf[subschema #1: MessageMetadata]/escalated_to_sme`
  - added the new optional request property `metadata/anyOf[subschema #1: MessageMetadata]/guardrailed`
  - added the new optional request property `metadata/anyOf[subschema #1: MessageMetadata]/original_llm_response`
  - …8 more
- **2025-04-15** `bb543bebe38d` — 10 breaking, 10 info
  - the response property `metadata/scores/anyOf[subschema #1: ResponseScoreMetadata]/context_sufficiency/anyOf[subschema #1: EvalResult]/log/anyOf[subschema #1: EvalLog]/explanation` became optional for the status `201`
  - the response property `metadata/scores/anyOf[subschema #1: ResponseScoreMetadata]/query_ease/anyOf[subschema #1: EvalResult]/log/anyOf[subschema #1: EvalLog]/explanation` became optional for the status `201`
  - the response property `metadata/scores/anyOf[subschema #1: ResponseScoreMetadata]/response_groundedness/anyOf[subschema #1: EvalResult]/log/anyOf[subschema #1: EvalLog]/explanation` became optional for the status `201`
  - the response property `metadata/scores/anyOf[subschema #1: ResponseScoreMetadata]/response_helpfulness/anyOf[subschema #1: EvalResult]/log/anyOf[subschema #1: EvalLog]/explanation` became optional for the status `201`
  - …16 more
- …earlier changes not shown

[Full history](https://skmtc.dev/cleanlab/apis/agility/changes/api/threads/:thread_id/messages/post.md)

---

[API](https://skmtc.dev/cleanlab/apis/agility.md) · [All operations](https://skmtc.dev/cleanlab/apis/agility/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cleanlab/agility/revisions/9e6009a931b6/schema)
