<span id="取消-ui-协议会话置顶"></span>

# Unpin a UI protocol conversation

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

Maintain conversation records owned by the current user.


```http
DELETE https://api.moi.matrixorigin.cn/v5/sessions/{session_id}/pin
```

<span id="调用前准备"></span>

## Before you call this API

`BASE_URL` uses the product API prefix `https://api.moi.matrixorigin.cn/v5`. For a dedicated deployment, use its corresponding product API address.

[Configure identity, workspace, and numeric record IDs in the same environment](objects.md#prepare). This endpoint uses regular product authentication and rejects additional task-runtime authorization headers.

<span id="请求"></span>

## Request

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

```bash
curl --request DELETE \
  "$BASE_URL/sessions/$SESSION_ID/pin" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} Parameters

| Parameter | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Workspace-ID` | Header | string | Yes | Target workspace ID. |
| `session_id` | Path | integer | Yes | Positive integer record ID owned by the current user. |

Returns HTTP 200 with an operation-result object, not204. Sets or removes the system/pinned relation. Confirm through pinned reads rather than empty tags in the conversation object.

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

<span id="成功响应"></span>

## Successful response

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

```json
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "message": "unpinned"
  }
}
```

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

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | OK on success; HTTP status200. |
| `msg` | string | OK on success. |
| `data.message` | string | Operation result: pinned, unpinned, or deleted. |

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

<span id="错误响应"></span>

## Error response

[Error formats and result confirmation](objects.md#error-contract) distinguishes detail not-found from general service errors on other endpoints.
