# Delete a Response

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Delete a stored Response. After successful deletion, the response can no longer be retrieved through the API.

```text
DELETE https://token.moi.matrixorigin.cn/v1/responses/$RESPONSE_ID
```

## Before you begin

1. [Create a Response](../text-generation/responses.md#request-body) with storage enabled on a model service that supports storage and retrieval. Select a response that is still accessible and has not been deleted or expired.
2. Prepare the [personal access token](../../../../guides/billing/credentials.md#personal-access-token) used to create that response.

## Request example

Replace `$GENESIS_ACCESS_TOKEN` and `$RESPONSE_ID` with your personal access token and the selected response ID.

```bash
curl -X DELETE \
  "https://token.moi.matrixorigin.cn/v1/responses/$RESPONSE_ID" \
  -H "Authorization: Bearer $GENESIS_ACCESS_TOKEN"
```

## Path parameters

::::{div} mo-api-parameter-table

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `response_id` | string | Yes | Stored Response identifier from `id` in the create response result. |

::::

## Successful response

A successful request confirms deletion; the response can no longer be retrieved.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "id": "resp-example",
  "deleted": true
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Identifier of the deleted Response. |
| `deleted` | boolean | `true` confirms deletion. |

:::::
::::::
:::::::

## Error response

HTTP `404` indicates a missing, deleted, expired, or inaccessible response. Check the response ID and the credentials used to create it.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "error": {
    "message": "response state not found",
    "type": "response_state_not_found",
    "code": "response_state_not_found"
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `error` | object | Error details. |
| `error.message` | string | Description of an unavailable or missing response. |
| `error.type` | string | Error type. |
| `error.code` | string | Error code. |

:::::
::::::
:::::::
