> ## 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 OpenAiChatMessage

> Retrieve a single OpenAiChatMessage record by its Id.

An **OpenAiChatMessage** records a message in an AI-powered chat conversation. Each message tracks the content, the associated customer or operator, and the action type.

## 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 **`OpenAiChatMessage-Read`** role.
</Note>

## Path Parameters

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

## Code Examples

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

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/sys/openaichatmessages/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/openaichatmessages/87654321',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

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

## Response

### 200

<ResponseField name="BusinessId" type="integer">
  ID of the business linked to this record.
</ResponseField>

<ResponseField name="UserId" type="integer">
  ID of the user linked to this record.
</ResponseField>

<ResponseField name="AiChannelSessionId" type="integer">
  ID of the AI channel session linked to this message. Sessions group all messages in a conversation and link it to a specific user and AI channel (e.g. email, chat, WhatsApp).
</ResponseField>

<ResponseField name="AiChannelSessionExternalIdentifier" type="string">
  External identifier of the AI channel session linked to this message. Email address for email sessions, phone number for WhatsApp, etc..
</ResponseField>

<ResponseField name="AiChannelSessionCoworkerId" type="string">
  ID of the customer linked to the AI channel session.
</ResponseField>

<ResponseField name="AiChannelSessionCoworkerCoworkerType" type="string">
  The type of the customer linked to the AI channel session (e.g. Individual or Company).
</ResponseField>

<ResponseField name="AiChannelSessionCoworkerFullName" type="string">
  Full name of the customer linked to the AI channel session.
</ResponseField>

<ResponseField name="AiChannelSessionCoworkerMobilePhone" type="string">
  Mobile phone number of the customer linked to the AI channel session.
</ResponseField>

<ResponseField name="AiChannelSessionCoworkerLandLine" type="string">
  Landline phone number of the customer linked to the AI channel session.
</ResponseField>

<ResponseField name="AiChannelSessionCoworkerBillingName" type="string">
  Billing name of the customer linked to the AI channel session.
</ResponseField>

<ResponseField name="AiChannelSessionCoworkerCompanyName" type="string">
  Company name of the customer linked to the AI channel session (if the customer is a company).
</ResponseField>

<ResponseField name="AiChannelSessionCoworkerTeamNames" type="string">
  Comma-separated list of team names that the customer linked to the AI channel session belongs to.
</ResponseField>

<ResponseField name="Action" type="integer">
  The action value for this open ai chat message. See `eOpenAiChatMessageType` enum values: `1` = Operator.
</ResponseField>

<ResponseField name="Content" type="string">
  The content value for this open ai chat message.
</ResponseField>

<ResponseField name="ChatSession" type="string">
  The chat session value for this open ai chat message.
</ResponseField>

<ResponseField name="ResponderName" type="string">
  Display name of the linked responder (read-only).
</ResponseField>

<ResponseField name="ChatMessageRole" type="string">
  The chat message role value for this open ai chat message.
</ResponseField>

<ResponseField name="Rating" type="integer">
  The rating value for this open ai chat message.
</ResponseField>

<ResponseField name="Channel" type="string">
  The AI channel through which this message was sent (e.g. Email, Chat, WhatsApp).
</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}
{
  "BusinessId": 0,
  "UserId": null,
  "AiChannelSessionId": null,
  "AiChannelSessionExternalIdentifier": null,
  "AiChannelSessionCoworkerId": null,
  "AiChannelSessionCoworkerCoworkerType": null,
  "AiChannelSessionCoworkerFullName": null,
  "AiChannelSessionCoworkerMobilePhone": null,
  "AiChannelSessionCoworkerLandLine": null,
  "AiChannelSessionCoworkerBillingName": null,
  "AiChannelSessionCoworkerCompanyName": null,
  "AiChannelSessionCoworkerTeamNames": null,
  "Action": 0,
  "Content": "",
  "ChatSession": null,
  "ResponderName": null,
  "ChatMessageRole": null,
  "Rating": null,
  "Channel": 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": "OpenAiChatMessage Example",
  "LocalizationDetails": null,
  "CustomFields": null
}
```
