> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get one AdminAgentMessage

> Retrieve a single AdminAgentMessage record by its Id.

An individual message within an admin agent session conversation. Messages can be from the user, assistant, system, or tool calls/results. Each message tracks its role, content, and any tool interactions including tool name, arguments, and results. Token usage is tracked per message for cost monitoring.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`AdminAgentMessage-Read`** role.
</Note>

## Path Parameters

<ParamField path="id" type="integer" required>
  The Id of the AdminAgentMessage record to retrieve.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/sys/adminagentmessages/87654321" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/sys/adminagentmessages/87654321',
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const record = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/sys/adminagentmessages/87654321',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  record = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="AdminAgentSessionId" type="integer">
  ID of the admin agent session linked to this message.
</ResponseField>

<ResponseField name="Role" type="integer">
  Role of the message sender: User, Assistant, System, ToolCall, or ToolResult.
</ResponseField>

<ResponseField name="Content" type="string">
  The text content of the message.
</ResponseField>

<ResponseField name="ToolName" type="string">
  Name of the tool that was called or produced a result.
</ResponseField>

<ResponseField name="ToolArguments" type="string">
  JSON-formatted arguments passed to the tool.
</ResponseField>

<ResponseField name="ToolResult" type="string">
  JSON-formatted result returned by the tool.
</ResponseField>

<ResponseField name="TokensUsed" type="integer">
  Number of LLM tokens consumed by this message.
</ResponseField>

<ResponseField name="AuthorId" type="integer">
  User who wrote the message (people only).
</ResponseField>

<ResponseField name="AuthorFullName" type="string">
  Display value for Author.FullName..
</ResponseField>

<ResponseField name="AuthorEmail" type="string">
  Display value for Author.Email..
</ResponseField>

<ResponseField name="Target" type="integer">
  Agent when the assistant was asked to answer, Chat when the message was for the people in the conversation.
</ResponseField>

<ResponseField name="Mentions" type="string">
  JSON with the users and/or agent mentioned in the message.
</ResponseField>

<ResponseField name="Id" type="integer">
  Unique record identifier.
</ResponseField>

<ResponseField name="UniqueId" type="string">
  UUID of the record.
</ResponseField>

<ResponseField name="CreatedOn" type="string">
  Date and time the record was created (ISO 8601).
</ResponseField>

<ResponseField name="UpdatedOn" type="string">
  Date and time the record was last updated (ISO 8601).
</ResponseField>

<ResponseField name="UpdatedBy" type="string">
  Email of the user who last updated this record.
</ResponseField>

<ResponseField name="IsNew" type="boolean">
  Whether the record was recently created.
</ResponseField>

<ResponseField name="SystemId" type="string">
  External system identifier.
</ResponseField>

```json Example Response theme={null}
{
  "AdminAgentSessionId": 0,
  "Role": 0,
  "Content": null,
  "ToolName": null,
  "ToolArguments": null,
  "ToolResult": null,
  "TokensUsed": 0,
  "AuthorId": null,
  "AuthorFullName": null,
  "AuthorEmail": null,
  "Target": 0,
  "Mentions": null,
  "Id": 87654321,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "CreatedOn": "2025-01-10T08:00:00Z",
  "UniqueId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "UpdatedBy": "admin@example.com",
  "IsNew": false,
  "SystemId": null,
  "ToStringText": "AdminAgentMessage Example",
  "LocalizationDetails": null,
  "CustomFields": null
}
```
