{
"error": {
"message": "Metadata is required"
}
}
{
"error": {
"message": "Thread not found"
}
}
This endpoint allows you to update the metadata of a thread by its unique identifier. Metadata is a key-value storage system that developers can use to store useful information associated with a thread.
A set of key-value pairs that can be attached to the thread. This can be used to store additional information about the thread to facilitate filtering or organization. Note that the new metadata provided will completely overwrite any existing metadata for the thread.
A log created by the first message that creates the thread.
Show child attributes
Was this page helpful?
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Langtail Docs","colors":{"primary":"#4f46e5","light":"#6366F1","dark":"#4338CA"},"favicon":"/images/favicon.svg","logo":{"light":"https://mintcdn.com/langtail-64/21vrq2LQuE9wZl3n/images/logo/light.svg?fit=max\u0026auto=format\u0026n=21vrq2LQuE9wZl3n\u0026q=85\u0026s=9a2020ca308f997e25f1af399ddc13fa","dark":"https://mintcdn.com/langtail-64/21vrq2LQuE9wZl3n/images/logo/dark.svg?fit=max\u0026auto=format\u0026n=21vrq2LQuE9wZl3n\u0026q=85\u0026s=42611dc0b61af027330cd7fb358de292"},"appearance":{"default":"dark","strict":true},"navbar":{"links":[{"label":"Join Discord","href":"https://discord.com/invite/PpNqWYdBCS"}],"primary":{"type":"button","label":"Open Langtail","href":"https://app.langtail.com"}},"footer":{"socials":{"twitter":"https://twitter.com/langtail","youtube":"https://www.youtube.com/@langtail","linkedin":"https://www.linkedin.com/company/langtail"}},"integrations":{"mixpanel":{"projectToken":"d93a0106154a1a514d81ce1f02019340"}},"navigation":{"global":{"anchors":[{"anchor":"Community","href":"https://discord.com/invite/PpNqWYdBCS","icon":"discord"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"langtail-64","hasAudioNarration":false,"actualSubdomain":"langtail-64","customDomains":["langtail.com"],"gitSource":{"type":"github","owner":"langtail","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae91e89dad76a2288f7f3ec:success","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Documentation","count":37},{"language":"default","tag":"Concepts and Examples","count":18},{"language":"default","tag":"References","count":12},{"language":"default","tag":"Threads","count":5},{"language":"default","tag":"Assistant messages in threads","count":5},{"language":"default","tag":"Playground","count":5},{"language":"default","tag":"Deployments","count":4},{"language":"default","tag":"OpenAI Proxy","count":4},{"language":"default","tag":"Tests","count":3},{"language":"default","tag":"Introduction","count":3}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoint/update-thread","slug":"/api-reference/endpoint/update-thread","pageMetadata":{"title":"Update a Thread by ID","openapi":"POST /v2/threads/{threadId}","description":"Updates a thread's metadata by its ID.","href":"/api-reference/endpoint/update-thread"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Updates a thread’s metadata by its ID.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={li:`li`,p:`p`,ul:`ul`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This endpoint allows you to update the metadata of a thread by its unique identifier. Metadata is a key-value storage system that developers can use to store useful information associated with a thread.`}),`\n`,_jsx(Heading,{level:`2`,id:`metadata-usage`,children:`Metadata Usage`}),`\n`,_jsx(_components.p,{children:`Metadata can be used to store various types of information related to the thread, such as:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`User information (e.g., user ID, name, preferences)`}),`\n`,_jsx(_components.li,{children:`Conversation context (e.g., topic, category, priority)`}),`\n`,_jsx(_components.li,{children:`Custom flags or tags`}),`\n`,_jsx(_components.li,{children:`Timestamps for specific events`}),`\n`,_jsx(_components.li,{children:`Any other relevant data for your application`}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a Thread by ID","openapi":"POST /v2/threads/{threadId}","description":"Updates a thread's metadata by its ID.","href":"/api-reference/endpoint/update-thread"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Metadata Usage","slug":"metadata-usage","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"Updates a thread's metadata by its ID.","servers":["afd496c8-39ee-479e-afd9-5d16f216a17a"],"parameters":["45afbb45-cf1b-4971-b1f5-b625cd148ca9","c3c88654-4763-4cd6-9515-cf2548a4095f"],"requestBody":"3c0c0d2d-ab0b-48e7-98fb-076a5759e031","responses":{"200":"b54b340f-34ac-4497-81b6-7c5085666cb1","400":"55f2e3a9-fd02-4ed8-979d-a0bc0626b1ff","404":"f9b4a8c9-8388-4335-a5ea-d52fd5563c9b"},"method":"post","type":"path","security":[],"path":"/v2/threads/{threadId}","baseUrlOptions":["https://api.langtail.com"],"title":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"45afbb45-cf1b-4971-b1f5-b625cd148ca9":{"schema":{"type":"string","example":"\u003cLANGTAIL_API_KEY>","isRequired":true,"description":"Your Langtail API Key","uniqueKey":"","typeLabel":"string"},"required":true,"description":"Your Langtail API Key","name":"X-API-Key","in":"header"},"c3c88654-4763-4cd6-9515-cf2548a4095f":{"name":"threadId","in":"path","required":true,"description":"The ID of the thread to update.","schema":{"type":"string","isRequired":true,"description":"The ID of the thread to update.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","description":"A set of key-value pairs that can be attached to the thread. This can be used to store additional information about the thread to facilitate filtering or organization. Note that the new metadata provided will completely overwrite any existing metadata for the thread.","example":{"user_id":"user_123","conversation_topic":"product_inquiry","priority":"high"},"isRequired":true,"uniqueKey":"metadata","typeLabel":"object"}},"required":["metadata"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"metadata":{"user_id":"user_123","conversation_topic":"product_inquiry","priority":"high"}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"b54b340f-34ac-4497-81b6-7c5085666cb1":{"description":"Successfully updated thread","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the thread.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"createdAt":{"type":"integer","description":"The Unix timestamp (in seconds) of when the thread was created.","isRequired":true,"uniqueKey":"createdAt","typeLabel":"integer"},"projectId":{"type":"string","description":"The ID of the project this thread belongs to.","isRequired":true,"uniqueKey":"projectId","typeLabel":"string"},"metadata":{"type":"object","description":"The updated set of key-value pairs attached to the thread.","example":{"user_id":"user_123","conversation_topic":"product_inquiry","priority":"high"},"isRequired":true,"uniqueKey":"metadata","typeLabel":"object"},"createLog":{"oneOf":[{"type":"object","description":"A log created by the first message that creates the thread.","properties":{"id":{"type":"string","description":"The unique identifier for the log.","uniqueKey":"createLog.oneOf.0.id","typeLabel":"string"},"url":{"type":"string","description":"The URL of the request.","uniqueKey":"createLog.oneOf.0.url","typeLabel":"string"},"stream":{"type":"boolean","description":"Indicates if the request was streamed.","uniqueKey":"createLog.oneOf.0.stream","typeLabel":"boolean"},"metadata":{"type":"string","description":"Additional metadata associated with the log.","uniqueKey":"createLog.oneOf.0.metadata","typeLabel":"string"},"promptId":{"type":"string","description":"The ID of the prompt used.","uniqueKey":"createLog.oneOf.0.promptId","typeLabel":"string"},"threadId":{"oneOf":[{"type":"string","description":"The ID of the associated thread, if any.","uniqueKey":"createLog.oneOf.0.threadId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The ID of the associated thread, if any.","uniqueKey":"createLog.oneOf.0.threadId.oneOf.1","typeLabel":"null"}],"uniqueKey":"createLog.oneOf.0.threadId","typeLabel":"string | null"},"assistant":{"type":"boolean","description":"Indicates if an assistant was used.","uniqueKey":"createLog.oneOf.0.assistant","typeLabel":"boolean"},"projectId":{"type":"string","description":"The ID of the project.","uniqueKey":"createLog.oneOf.0.projectId","typeLabel":"string"},"requestIP":{"type":"string","description":"The IP address of the request.","uniqueKey":"createLog.oneOf.0.requestIP","typeLabel":"string"},"startedAt":{"type":"string","format":"date-time","description":"The timestamp when the request started.","uniqueKey":"createLog.oneOf.0.startedAt","typeLabel":"string\u003cdate-time>"},"variables":{"type":"string","description":"Variables used in the request.","uniqueKey":"createLog.oneOf.0.variables","typeLabel":"string"},"parameters":{"type":"string","description":"Parameters used in the request.","uniqueKey":"createLog.oneOf.0.parameters","typeLabel":"string"},"promptSlug":{"type":"string","description":"The slug of the prompt used.","uniqueKey":"createLog.oneOf.0.promptSlug","typeLabel":"string"},"doNotRecord":{"type":"boolean","description":"Indicates if the request should not be recorded.","uniqueKey":"createLog.oneOf.0.doNotRecord","typeLabel":"boolean"},"environment":{"type":"string","description":"The environment in which the request was made.","uniqueKey":"createLog.oneOf.0.environment","typeLabel":"string"},"openAIKeyId":{"type":"string","description":"The ID of the OpenAI key used.","uniqueKey":"createLog.oneOf.0.openAIKeyId","typeLabel":"string"},"projectSlug":{"type":"string","description":"The slug of the project.","uniqueKey":"createLog.oneOf.0.projectSlug","typeLabel":"string"},"requestData":{"type":"string","description":"Data associated with the request.","uniqueKey":"createLog.oneOf.0.requestData","typeLabel":"string"},"deploymentId":{"type":"string","description":"The ID of the deployment.","uniqueKey":"createLog.oneOf.0.deploymentId","typeLabel":"string"},"organizationId":{"type":"string","description":"The ID of the organization.","uniqueKey":"createLog.oneOf.0.organizationId","typeLabel":"string"},"projectAPIKeyId":{"type":"string","description":"The ID of the project API key.","uniqueKey":"createLog.oneOf.0.projectAPIKeyId","typeLabel":"string"},"organizationSlug":{"type":"string","description":"The slug of the organization.","uniqueKey":"createLog.oneOf.0.organizationSlug","typeLabel":"string"},"deploymentVersion":{"oneOf":[{"type":"string","description":"The version of the deployment, if applicable.","uniqueKey":"createLog.oneOf.0.deploymentVersion.oneOf.0","typeLabel":"string"},{"type":"null","description":"The version of the deployment, if applicable.","uniqueKey":"createLog.oneOf.0.deploymentVersion.oneOf.1","typeLabel":"null"}],"uniqueKey":"createLog.oneOf.0.deploymentVersion","typeLabel":"string | null"},"promptHistoryHash":{"type":"string","description":"A hash of the prompt history.","uniqueKey":"createLog.oneOf.0.promptHistoryHash","typeLabel":"string"},"openAIOrganization":{"oneOf":[{"type":"string","description":"The OpenAI organization, if applicable.","uniqueKey":"createLog.oneOf.0.openAIOrganization.oneOf.0","typeLabel":"string"},{"type":"null","description":"The OpenAI organization, if applicable.","uniqueKey":"createLog.oneOf.0.openAIOrganization.oneOf.1","typeLabel":"null"}],"uniqueKey":"createLog.oneOf.0.openAIOrganization","typeLabel":"string | null"}},"uniqueKey":"createLog.oneOf.0","typeLabel":"object"},{"type":"null","description":"A log created by the first message that creates the thread.","properties":{"id":{"type":"string","description":"The unique identifier for the log."},"url":{"type":"string","description":"The URL of the request."},"stream":{"type":"boolean","description":"Indicates if the request was streamed."},"metadata":{"type":"string","description":"Additional metadata associated with the log."},"promptId":{"type":"string","description":"The ID of the prompt used."},"threadId":{"oneOf":[{"type":"string","description":"The ID of the associated thread, if any."},{"type":"null","description":"The ID of the associated thread, if any."}]},"assistant":{"type":"boolean","description":"Indicates if an assistant was used."},"projectId":{"type":"string","description":"The ID of the project."},"requestIP":{"type":"string","description":"The IP address of the request."},"startedAt":{"type":"string","format":"date-time","description":"The timestamp when the request started."},"variables":{"type":"string","description":"Variables used in the request."},"parameters":{"type":"string","description":"Parameters used in the request."},"promptSlug":{"type":"string","description":"The slug of the prompt used."},"doNotRecord":{"type":"boolean","description":"Indicates if the request should not be recorded."},"environment":{"type":"string","description":"The environment in which the request was made."},"openAIKeyId":{"type":"string","description":"The ID of the OpenAI key used."},"projectSlug":{"type":"string","description":"The slug of the project."},"requestData":{"type":"string","description":"Data associated with the request."},"deploymentId":{"type":"string","description":"The ID of the deployment."},"organizationId":{"type":"string","description":"The ID of the organization."},"projectAPIKeyId":{"type":"string","description":"The ID of the project API key."},"organizationSlug":{"type":"string","description":"The slug of the organization."},"deploymentVersion":{"oneOf":[{"type":"string","description":"The version of the deployment, if applicable."},{"type":"null","description":"The version of the deployment, if applicable."}]},"promptHistoryHash":{"type":"string","description":"A hash of the prompt history."},"openAIOrganization":{"oneOf":[{"type":"string","description":"The OpenAI organization, if applicable."},{"type":"null","description":"The OpenAI organization, if applicable."}]}},"uniqueKey":"createLog.oneOf.1","typeLabel":"null"}],"uniqueKey":"createLog","typeLabel":"object | null"}},"required":["id","createdAt","projectId","metadata"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","createdAt":123,"projectId":"\u003cstring>","metadata":{"user_id":"user_123","conversation_topic":"product_inquiry","priority":"high"},"createLog":{"id":"\u003cstring>","url":"\u003cstring>","stream":true,"metadata":"\u003cstring>","promptId":"\u003cstring>","threadId":"\u003cstring>","assistant":true,"projectId":"\u003cstring>","requestIP":"\u003cstring>","startedAt":"2023-11-07T05:31:56Z","variables":"\u003cstring>","parameters":"\u003cstring>","promptSlug":"\u003cstring>","doNotRecord":true,"environment":"\u003cstring>","openAIKeyId":"\u003cstring>","projectSlug":"\u003cstring>","requestData":"\u003cstring>","deploymentId":"\u003cstring>","organizationId":"\u003cstring>","projectAPIKeyId":"\u003cstring>","organizationSlug":"\u003cstring>","deploymentVersion":"\u003cstring>","promptHistoryHash":"\u003cstring>","openAIOrganization":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"55f2e3a9-fd02-4ed8-979d-a0bc0626b1ff":{"description":"Metadata is required","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","example":"Metadata is required","uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Metadata is required"}}}},"exampleType":"generated"}},"exampleType":"generated"},"f9b4a8c9-8388-4335-a5ea-d52fd5563c9b":{"description":"Thread not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","example":"Thread not found","uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"message":"Thread not found"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{"afd496c8-39ee-479e-afd9-5d16f216a17a":{"url":"https://api.langtail.com"}}},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"langtail-64","siteName":"Langtail Docs","title":"Update a Thread by ID - Langtail Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T00:48:04.589Z","originalFileLocation":"api-reference/endpoint/update-thread.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Updates a thread\u0026#x27;s metadata by its ID.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Langtail Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a Thread by ID - Langtail Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Updates a thread\u0026#x27;s metadata by its ID.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Langtail Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://langtail.com/docs/api-reference/endpoint/update-thread\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://langtail-64.mintlify.site/docs/_mintlify/api/og/v2?division=Threads\u0026amp;title=Update+a+Thread+by+ID\u0026amp;description=Updates+a+thread%27s+metadata+by+its+ID.\u0026amp;theme=3f4278914b3083aa55ddc90f\u0026amp;signature=39d48e751ffbf7201aa2f627b48b16e158d014f60d643f8814099bd9cbf85271\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update a Thread by ID - Langtail Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Updates a thread\u0026#x27;s metadata by its ID.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://langtail-64.mintlify.site/docs/_mintlify/api/og/v2?division=Threads\u0026amp;title=Update+a+Thread+by+ID\u0026amp;description=Updates+a+thread%27s+metadata+by+its+ID.\u0026amp;theme=3f4278914b3083aa55ddc90f\u0026amp;signature=39d48e751ffbf7201aa2f627b48b16e158d014f60d643f8814099bd9cbf85271\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/langtail-64/gNTkU_HUz-gakvd9/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Langtail Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://langtail.com/docs/api-reference/endpoint/update-thread\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/endpoint/update-thread.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://langtail.com/#organization\",\"name\":\"Langtail Docs\",\"url\":\"https://langtail.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/langtail-64/21vrq2LQuE9wZl3n/images/logo/light.svg?fit=max\u0026auto=format\u0026n=21vrq2LQuE9wZl3n\u0026q=85\u0026s=9a2020ca308f997e25f1af399ddc13fa\"}},{\"@type\":\"WebSite\",\"@id\":\"https://langtail.com/docs#website\",\"name\":\"Langtail Docs\",\"url\":\"https://langtail.com/docs\",\"publisher\":{\"@id\":\"https://langtail.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://langtail.com/docs/api-reference/endpoint/update-thread#webpage\",\"url\":\"https://langtail.com/docs/api-reference/endpoint/update-thread\",\"name\":\"Update a Thread by ID\",\"description\":\"Updates a thread's metadata by its ID.\",\"dateModified\":\"2026-01-07T00:48:04.589Z\",\"isPartOf\":{\"@id\":\"https://langtail.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://langtail.com/docs/api-reference/endpoint/update-thread#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://langtail.com/docs/api-reference/endpoint/update-thread#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"References\",\"item\":\"https://langtail.com/docs/api-reference/endpoint/invoke-deployed-prompt\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Threads\",\"item\":\"https://langtail.com/docs/api-reference/endpoint/threads\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Update a Thread by ID\",\"item\":\"https://langtail.com/docs/api-reference/endpoint/update-thread\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://langtail.com/docs/api-reference/endpoint/update-thread#apireference\",\"headline\":\"Update a Thread by ID\",\"name\":\"Update a Thread by ID\",\"description\":\"Updates a thread's metadata by its ID.\",\"url\":\"https://langtail.com/docs/api-reference/endpoint/update-thread\",\"mainEntityOfPage\":{\"@id\":\"https://langtail.com/docs/api-reference/endpoint/update-thread#webpage\"},\"dateModified\":\"2026-01-07T00:48:04.589Z\",\"publisher\":{\"@id\":\"https://langtail.com/#organization\"},\"isPartOf\":{\"@id\":\"https://langtail.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Langtail Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Langtail Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/endpoint/update-thread.md","siteName":"Langtail Docs","nav":{"global":{"anchors":[{"anchor":"Community","href":"https://discord.com/invite/PpNqWYdBCS","icon":"discord"}]},"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Introduction","pages":[{"title":"What is Langtail?","href":"/introduction/what-is-langtail"},{"title":"Getting started","href":"/introduction/getting-started"},{"title":"Main concepts in Langtail","sidebarTitle":"Main concepts in Langtail","href":"/introduction/main-concepts-in-langtail"}]},{"group":"Concepts and Examples","pages":[{"title":"Concepts and Examples Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/overview"},{"group":"Playground","pages":[{"title":"Playground Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/playground/overview"},{"title":"Prompt Templating","href":"/concepts-and-examples/playground/templating"},{"title":"Assistants \u0026 Threads","sidebarTitle":"Assistants \u0026 Threads","href":"/concepts-and-examples/playground/assistants-threads"},{"title":"Variables","href":"/concepts-and-examples/playground/variables"},{"title":"Tools","href":"/concepts-and-examples/playground/tools"}]},{"group":"Tests","pages":[{"title":"Tests Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/tests/overview"},{"title":"Basic Tests","href":"/concepts-and-examples/tests/basic-tests"},{"title":"Advanced tests","sidebarTitle":"Advanced tests","href":"/concepts-and-examples/tests/adv-tests"}]},{"group":"Deployments","pages":[{"title":"Deployments Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/deployments/overview"},{"title":"Deploy Prompt","href":"/concepts-and-examples/deployments/deploy-prompt"},{"title":"API keys and Env Variables","href":"/concepts-and-examples/deployments/api-keys"}]},{"group":"Logs and Metrics","pages":[{"title":"Logs and Metrics Overview","sidebarTitle":"Overview","href":"/concepts-and-examples/logs-and-metrics/overview"}]},{"group":"OpenAI Proxy","pages":[{"title":"Integrate via Langtail SDK","href":"/concepts-and-examples/proxy/integrate-sdk"},{"title":"Integrate via OpenAI library","href":"/concepts-and-examples/proxy/openai"},{"title":"Integrate via REST API","href":"/concepts-and-examples/proxy/rest"},{"title":"Integrate via Langchain","href":"/concepts-and-examples/proxy/langchain"}]},{"group":"SDKs","pages":[{"title":"TypeScript SDK","href":"/concepts-and-examples/sdks/typescript"}]}]},{"group":"References","pages":[{"group":"Deployments","pages":[{"title":"Invoke Deployed Prompt","openapi":"POST /{workspace}/{project}/{prompt}/{environment}","href":"/api-reference/endpoint/invoke-deployed-prompt"}]},{"group":"Assistants","pages":[{"title":"Invoke Assistant","openapi":"POST /{workspace}/{project}/{assistant}/{environment}","href":"/api-reference/endpoint/invoke-assistant"}]},{"group":"Threads","pages":[{"title":"List Threads","openapi":"GET /v2/threads","href":"/api-reference/endpoint/threads"},{"title":"Create a Thread","openapi":"POST /v2/threads","href":"/api-reference/endpoint/create-thread"},{"title":"Thread by ID","openapi":"GET /v2/threads/{threadId}","href":"/api-reference/endpoint/thread"},{"title":"Delete a Thread by ID","openapi":"DELETE /v2/threads/{threadId}","description":"Deletes a thread by its ID.","href":"/api-reference/endpoint/delete-thread"},{"title":"Update a Thread by ID","openapi":"POST /v2/threads/{threadId}","href":"/api-reference/endpoint/update-thread"}]},{"group":"Assistant messages in threads","pages":[{"title":"List Thread Messages","openapi":"GET /v2/threads/{threadId}/messages","description":"Retrieves a list of messages for a specific thread.","href":"/api-reference/endpoint/thread-messages"},{"title":"Create Thread Message","openapi":"POST /v2/threads/{threadId}/messages","href":"/api-reference/endpoint/create-thread-message"},{"title":"Get Thread Message","openapi":"GET /v2/threads/{threadId}/messages/{messageId}","href":"/api-reference/endpoint/thread-message"},{"title":"Update Thread Message","openapi":"POST /v2/threads/{threadId}/messages/{messageId}","href":"/api-reference/endpoint/update-message"},{"title":"Delete Thread Message","openapi":"DELETE /v2/threads/{threadId}/messages/{messageId}","href":"/api-reference/endpoint/delete-thread-message"}]}]},{"group":"Media \u0026 Presentations","pages":[{"title":"Make Chatbots Better | WebExpo Talk","sidebarTitle":"Make Chatbots Better","href":"/media-presentations/web-expo"},{"title":"Deepnote | Case study","url":"https://langtail.com/customers/deepnote","href":"/media-presentations/deepnote-case"}]},{"group":"Support \u0026 Community","pages":[{"title":"Changelog","href":"/support/changelog"},{"title":"Get Help","href":"/support/get-help"}]}]}]},"basePath":"","title":"Update a Thread by ID - Langtail Docs","buildId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","deploymentId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CASS2Vpq.js","utils-4k9fyWRu.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-UU-UueZb.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BgJ0LOYq.js","snippetPresets-CMgzlMR-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BzEJegkK.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CZuQIZdk.js","shallow-Bw5arfMA.js","getApiPlaygroundDisplay-Ds834aVN.js","CodeSnippet-CKzmjw9L.js","CodeSnippets-BRpgomdp.js","Page-DvEUoD2H.js","getPastedJson-B0N-Tn76.js","icon-DASMs9nC.js","MethodPill-BA6DBLqx.js","DuplicateIcon-BMT5qfbJ.js","createIcon-CNfwVWPx.js","DynamicMarkdown-JYyBNlrJ.js","SectionHeading-BbZnmz8a.js","axios-vUo_bRtp.js","Markdown-LUU0YLpA.js","clsx-Di4ek5Ae.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-VEVWQCR4.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CPszyu99.js"]}