---
title: "Append a message to a thread"
method: POST
path: "/threads/{threadId}/messages"
tags: ["Messages"]
---

# Append a message to a thread

`POST /threads/{threadId}/messages`

Append a user message to an existing thread and trigger a deferred run.

## Path parameters

- `threadId` string, uuid, required — Thread ID to append the message to.

## Request body

- object
  - `message` string, required — Message body to append to the thread.
  - `wait` boolean — Whether the server should wait for the appended message run before responding.
  - `timeoutSeconds` integer — Maximum seconds to wait when wait is true before handing off to polling.
  - `automationId` string, uuid — Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run.
  - `ambientServiceRun` unknown

## Response `201`

OK

- object — Deferred run result for appending a message to an existing thread.
  - `completed` boolean, required — Whether the run has reached a terminal status.
  - `threadId` string, uuid, required — Thread ID associated with the run.
  - `runId` string, uuid, required — Run ID for subsequent polling.
  - `messageId` string, uuid — ID of the user message that triggered this run.
  - `status` 'processing' | 'completed' | 'aborted' | 'error', required — Current run lifecycle status.
  - `response` string, nullable, required — Assistant response text when the run has completed.

---

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