Skip to content

Delete Thread

DELETE
/api/chat/threads/{thread_id}

Delete a conversation thread

Permanently deletes a conversation thread and all its messages. This action cannot be undone.

Args: request: FastAPI request object thread_id: Thread identifier to delete backend: Backend service instance (injected via dependency)

Returns: ThreadDeleteResponse: Deletion confirmation

thread_id
required
Thread Id
string

Successful Response

ThreadDeleteResponse

Thread deletion response model - ULTRA-COMPLETE (40+ fields).

Confirms successful deletion of a conversation thread and all its messages.

Fields: status: Deletion status (“success”, “error”) message: Human-readable confirmation message thread_id: ID of deleted thread

Used By: - DELETE /api/chat/threads/{thread_id} endpoint - Thread deletion confirmation - Thread management UI

object
status
required
Status

Deletion status (‘success’ or ‘error’)

string
message
required
Message

Human-readable confirmation message

string
threadId
required
Threadid

ID of deleted thread

string
deletedMessageCount
Any of:
integer
deletedAt
Any of:
string
deletedBy
Any of:
string
softDelete
Any of:
boolean
permanentDelete
Any of:
boolean
canRestore
Any of:
boolean
restoreUntil
Any of:
string
threadTitle
Any of:
string
projectId
Any of:
string
conversationId
Any of:
string
requestId
Any of:
string
userId
Any of:
string
sessionId
Any of:
string
traceId
Any of:
string
correlationId
Any of:
string
operationDurationMs
Any of:
number
apiVersion
Any of:
string
serverVersion
Any of:
string
clientVersion
Any of:
string
timestamp
Any of:
string
errors
Any of:
Array<string>
warnings
Any of:
Array<string>
errorCount
Any of:
integer
warningCount
Any of:
integer
auditLogId
Any of:
string
backupCreated
Any of:
boolean
backupLocation
Any of:
string
environment
Any of:
string
region
Any of:
string
customMetadata
Any of:
CustomMetadataInfo

Custom metadata container for extensibility.

Provides a structured container for custom key-value metadata that doesn’t fit into predefined fields. Supports common metadata patterns.

Fields: tags: List of tags for categorization labels: Key-value labels annotations: Additional annotations source: Data source identifier version: Data version

Used By: - Various models’ custom_metadata fields

object
tags
Any of:
Array<string>
labels
Any of:
object
key
additional properties
string
annotations
Any of:
object
key
additional properties
string
source
Any of:
string
version
Any of:
string
extra
Any of:
object
key
additional properties
string
deprecationNotice
Any of:
string
migrationGuide
Any of:
string
extra
Any of:
CustomMetadataInfo

Custom metadata container for extensibility.

Provides a structured container for custom key-value metadata that doesn’t fit into predefined fields. Supports common metadata patterns.

Fields: tags: List of tags for categorization labels: Key-value labels annotations: Additional annotations source: Data source identifier version: Data version

Used By: - Various models’ custom_metadata fields

object
tags
Any of:
Array<string>
labels
Any of:
object
key
additional properties
string
annotations
Any of:
object
key
additional properties
string
source
Any of:
string
version
Any of:
string
extra
Any of:
object
key
additional properties
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object