---
title: "POST /threads/{threadId}"
method: POST
path: "/threads/{threadId}"
---

# POST /threads/{threadId}

`POST /threads/{threadId}`

Modifies an existing thread.

## Path parameters

- `threadId` string, required

## Request body

- UpdateAssistantThreadOptions — The details used to update an existing assistant thread
  - `tool_resources` UpdateToolResourcesOptions — Request object. A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
    - `code_interpreter` UpdateCodeInterpreterToolResourceOptions — Request object to update `code_interpreted` tool resources.
      - `file_ids` string[] — A list of file IDs to override the current list of the assistant.
    - `file_search` UpdateFileSearchToolResourceOptions — Request object to update `file_search` tool resources.
      - `vector_store_ids` string[] — A list of vector store IDs to override the current list of the assistant.
  - `metadata` object, nullable — A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

## Response `200`

Information about the modified thread.

- AssistantThread — Information about a single thread associated with an assistant.
  - `id` string, required — The identifier, which can be referenced in API endpoints.
  - `object` 'thread', required — The object type, which is always 'thread'.
  - `created_at` integer, required — The Unix timestamp, in seconds, representing when this object was created.
  - `tool_resources` ToolResources, required — A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.
    - `code_interpreter` CodeInterpreterToolResource — A set of resources that are used by the `code_interpreter` tool.
      - `file_ids` string[], required — A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.
    - `file_search` FileSearchToolResource — A set of resources that are used by the `file_search` tool.
      - `vector_store_ids` string[] — The ID of the vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.
  - `metadata` object, nullable, required — A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

---

[API](https://skmtc.net/azure/apis/ai-openai-assistants-openapiv2.md) · [All operations](https://skmtc.net/azure/apis/ai-openai-assistants-openapiv2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/ai-openai-assistants-openapiv2/versions/453a64f820f0/schema)
