Share via


Delete Agent - Delete Agent

Deletes an agent.

DELETE {endpoint}/assistants/{assistantId}?api-version=v1

URI Parameters

Name In Required Type Description
assistantId
path True

string

Identifier of the agent.

endpoint
path True

string (uri)

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

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

AgentDeletionStatus

Status information about the requested 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

DeleteAgent_MaximumSet
DeleteAgent_MinimumSet

DeleteAgent_MaximumSet

Sample request

DELETE {endpoint}/assistants/fgbcauktackwfdrloobnopgphaz?api-version=v1

Sample response

{
  "id": "gwimhndythrfxsjgcigdzspt",
  "deleted": true,
  "object": "assistant.deleted"
}

DeleteAgent_MinimumSet

Sample request

DELETE {endpoint}/assistants/fgbcauktackwfdrloobnopgphaz?api-version=v1

Sample response

{
  "id": "gwimhndythrfxsjgcigdzspt",
  "deleted": true,
  "object": "assistant.deleted"
}

Definitions

Name Description
AgentDeletionStatus

The status of an agent deletion operation.

AgentErrorDetail

Describes the error information returned by the agents API.

AgentV1Error

Error payload returned by the agents API.

AgentDeletionStatus

The status of an agent 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:

assistant.deleted

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

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.