# Get agent Web app publication records

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

Read an agent's public link, enablement state, and rotation time.


```http
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agents/{agent_id}/webapp
```

## Before you call this API

Set `BASE_URL` to the product API prefix `https://api.moi.matrixorigin.cn/v5`. For private deployments, use the corresponding product API URL.

[Prepare publication management identity and objects](objects.md#prepare).

## Request

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

```bash
curl --request GET \
  "$BASE_URL/workspaces/$WORKSPACE_ID/agents/$AGENT_ID/webapp" \
  --header "X-API-Key: $MOI_KEY" \
  --header "X-Workspace-ID: $WORKSPACE_ID"
```

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

| Parameter | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | Path | string | Yes | Publication Workspace ID in the same environment. |
| `agent_id` | Path | string | Yes | Target agent ID. |

For an older agent without a publication record, the first management read confirms the agent exists and creates a disabled record. Newly created agents have a separate enabled default in their creation chain. A successful read does not establish that public visitors can complete calls.

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

## Successful response

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

```json
{
  "code": 0,
  "data": {
    "agent_id": "agent-example",
    "enabled": true,
    "url": "https://app.example.invalid/webapp?k=example-short-code",
    "token": "example-publication-token",
    "created_at": "2026-11-12T01:00:00Z",
    "updated_at": "2026-11-12T01:00:00Z",
    "last_rotated_at": null
  }
}
```

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

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | Success code. |
| `data` | object | [Corresponding object](objects.md#responses). |

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

## Error responses

[Errors and read-back](lifecycle.md#errors) distinguishes parameters, permissions, and write results for this entry point.
