---
title: "Update Thread State"
method: POST
path: "/threads/{thread_id}/state"
tags: ["Threads"]
---

# Update Thread State

`POST /threads/{thread_id}/state`

Add state to a thread.

## Path parameters

- `thread_id` string, uuid, required — The ID of the thread.

## Request body

- ThreadStateUpdate — Payload for updating the state of a thread.
  - `values` object, nullable — The values to update the state with.
  - `checkpoint` CheckpointConfig — Checkpoint config.
    - `thread_id` string — Unique identifier for the thread associated with this checkpoint.
    - `checkpoint_ns` string — Namespace for the checkpoint, used for organization and retrieval.
    - `checkpoint_id` string — Optional unique identifier for the checkpoint itself.
    - `checkpoint_map` object — Optional dictionary containing checkpoint-specific data.

## Response `200`

Success

- ThreadStateUpdateResponse — Response for adding state to a thread.
  - `checkpoint` object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/xpert-ai/apis/agent-protocol.md) · [All operations](https://skmtc.net/xpert-ai/apis/agent-protocol/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xpert-ai/agent-protocol/versions/ac9dbe16ea2f/schema)
