Share via


Threads - Delete Thread

Deletes an existing thread.

DELETE {endpoint}/threads/{threadId}?api-version=v1

URI Parameters

Name In Required Type Description
endpoint
path True

string (uri)

Project endpoint in the form of: https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name>

threadId
path True

string

Identifier of the thread.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

ThreadDeletionStatus

Status information about the requested thread deletion operation.

Other Status Codes

AgentV1Error

An unexpected error response.

Security

OAuth2Auth

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/v2.0/authorize

Scopes

Name Description
https://ai.azure.com/.default

Examples

Threads_DeleteThread_MaximumSet
Threads_DeleteThread_MinimumSet

Threads_DeleteThread_MaximumSet

Sample request

DELETE {endpoint}/threads/qslbmcfelfehrfwrnrqbpix?api-version=v1

Sample response

{
  "id": "nishfajsphilcedyxkpc",
  "deleted": true,
  "object": "thread.deleted"
}

Threads_DeleteThread_MinimumSet

Sample request

DELETE {endpoint}/threads/ajvailgkxrgzmhg?api-version=v1

Sample response

{
  "id": "nishfajsphilcedyxkpc",
  "deleted": true,
  "object": "thread.deleted"
}

Definitions

Name Description
AgentErrorDetail

Describes the error information returned by the agents API.

AgentV1Error

Error payload returned by the agents API.

ThreadDeletionStatus

The status of a thread deletion operation.

AgentErrorDetail

Describes the error information returned by the agents API.

Name Type Description
code

string

Machine-readable error code.

message

string

Human-readable description of the error.

param

string

Name of the parameter that caused the error, if applicable.

type

string

Error type identifier (e.g. invalid_request_error).

AgentV1Error

Error payload returned by the agents API.

Name Type Description
error

AgentErrorDetail

Represents the error.

ThreadDeletionStatus

The status of a thread deletion operation.

Name Type Description
deleted

boolean

A value indicating whether deletion was successful.

id

string

The ID of the resource specified for deletion.

object enum:

thread.deleted

The object type, which is always 'thread.deleted'.