---
title: Delete annotations
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > LLM Observability
---

# Delete annotations{% #delete-annotations %}
Copy pageCopied
{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                         |
| ----------------- | ---------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | POST https://api.ap1.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete |
| ap2.datadoghq.com | POST https://api.ap2.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete |
| app.datadoghq.eu  | POST https://api.datadoghq.eu/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete      |
| app.ddog-gov.com  | POST https://api.ddog-gov.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete      |
| us2.ddog-gov.com  | POST https://api.us2.ddog-gov.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete  |
| app.datadoghq.com | POST https://api.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete     |
| us3.datadoghq.com | POST https://api.us3.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete |
| us5.datadoghq.com | POST https://api.us5.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations/delete |

### Overview

Delete one or more annotations from an annotation queue.

### Arguments

#### Path Parameters

| Name                       | Type   | Description                                       |
| -------------------------- | ------ | ------------------------------------------------- |
| queue_id [*required*] | string | The ID of the LLM Observability annotation queue. |

### Request

#### Body Data (required)

Delete annotations payload.

{% tab title="Model" %}

| Parent field | Field                            | Type     | Description                                                                         |
| ------------ | -------------------------------- | -------- | ----------------------------------------------------------------------------------- |
|              | data [*required*]           | object   | Data object for deleting annotations.                                               |
| data         | attributes [*required*]     | object   | Attributes for deleting annotations.                                                |
| attributes   | annotation_ids [*required*] | [string] | IDs of the annotations to delete. Must contain at least one item.                   |
| data         | type [*required*]           | enum     | Resource type for LLM Observability annotations. Allowed enum values: `annotations` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "annotation_ids": [
        "00000000-0000-0000-0000-000000000000",
        "00000000-0000-0000-0000-000000000001"
      ]
    },
    "type": "annotations"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK — annotations deleted. Errors for annotations that could not be deleted are listed in `errors`.
{% tab title="Model" %}
Response for a batch annotation deletion. Partial errors are listed in the response if any annotations could not be deleted.

| Parent field | Field                            | Type     | Description                                                                         |
| ------------ | -------------------------------- | -------- | ----------------------------------------------------------------------------------- |
|              | data [*required*]           | object   | Data object for the annotation deletion response.                                   |
| data         | attributes [*required*]     | object   | Attributes of the annotation deletion response.                                     |
| attributes   | annotation_ids [*required*] | [string] | IDs of the successfully deleted annotations.                                        |
| attributes   | errors [*required*]         | [object] | Errors for annotations that could not be deleted.                                   |
| errors       | annotation_id [*required*]  | string   | ID of the annotation that could not be deleted.                                     |
| errors       | error [*required*]          | string   | Error message.                                                                      |
| data         | id [*required*]             | string   | The annotation queue ID.                                                            |
| data         | type [*required*]           | enum     | Resource type for LLM Observability annotations. Allowed enum values: `annotations` |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "annotation_ids": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "errors": [
        {
          "annotation_id": "00000000-0000-0000-0000-000000000000",
          "error": "annotation not found"
        }
      ]
    },
    "id": "00000000-0000-0000-0000-000000000001",
    "type": "annotations"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="401" %}
Unauthorized
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found — the queue does not exist.
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
 \# Path parameters export queue_id="00000000-0000-0000-0000-000000000001" \# Curl command curl -X POST "https://api.datadoghq.com/api/v2/llm-obs/v1/annotation-queues/${queue_id}/annotations/delete" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "annotation_ids": [
        "00000000-0000-0000-0000-000000000000"
      ]
    },
    "type": "annotations"
  }
}
EOF 
                
{% /tab %}
