Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Delete ChatKit thread

ThreadDeleteResponse beta().chatkit().threads().delete(ThreadDeleteParamsparams = ThreadDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/chatkit/threads/{thread_id}

Delete a ChatKit thread along with its items and stored attachments.

ParametersExpand Collapse
ThreadDeleteParams params
Optional<String> threadId
ReturnsExpand Collapse
class ThreadDeleteResponse:

Confirmation payload returned after deleting a thread.

String id

Identifier of the deleted thread.

boolean deleted

Indicates that the thread has been deleted.

JsonValue; object_ "chatkit.thread.deleted"constant"chatkit.thread.deleted"constant

Type discriminator that is always chatkit.thread.deleted.

Delete ChatKit thread

package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.beta.chat_kit.threads.ThreadDeleteParams;
import com.openai.models.beta.chat_kit.threads.ThreadDeleteResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        ThreadDeleteResponse thread = client.beta().chat_kit().threads().delete("cthr_123");
    }
}
{
  "id": "id",
  "deleted": true,
  "object": "chatkit.thread.deleted"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "chatkit.thread.deleted"
}