Thread: Delete v1
The Delete Thread API allows you to delete threads that are no longer needed. This helps you manage conversation history and clean up unused threads in your applications.
You will need to generate an API key to authenticate your requests. For more information, visit the User/Org API key documentation.
DELETE/v1/threads/{threadId}
Delete a thread by its ID.
Headers
- Name
Authorization
- Type
- string
- Required
- Required
- Description
Replace
YOUR_API_KEY
with your User/Org API key
Path Parameters
- Name
threadId
- Type
- string
- Required
- Required
- Description
The unique identifier of the thread to delete.
Install the SDK
npm i langbase
Environment variables
.env file
LANGBASE_API_KEY="<YOUR_API_KEY>"
Delete a thread
Delete a thread
DELETE
/v1/threads/{threadId}curl -X DELETE https://api.langbase.com/v1/threads/{thread_id} \
-H 'Authorization: Bearer <YOUR_API_KEY>'
Response
The response is a simple JSON object that confirms the deletion operation.
- Name
success
- Type
- boolean
- Description
Indicates whether the thread was successfully deleted.
Response Example
{
"success": true
}