<span id="读取-ui-协议会话详情"></span>

# Get UI protocol conversation details

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

Read a conversation record owned by the current user.


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

<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 GET \
  "$BASE_URL/sessions/$SESSION_ID" \
  --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. |

If the target is missing or not owned by the current user, this detail endpoint maps to 404/ErrNotFound. Conversation tags currently return an empty array; do not use them instead of querying pinned relations.

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

<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": {
    "id": 41,
    "title": "临时会话",
    "source": "moi",
    "user_id": "user-example",
    "config": "{}",
    "tags": [],
    "created_at": 1794445200,
    "updated_at": 1794445200
  }
}
```

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

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | OK on success; HTTP status200. |
| `msg` | string | OK on success. |
| `data` | object | [Conversation object](objects.md#session-object). |

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

<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.
