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

> Retrieve a single AiChannelSession record by its Id.

An AiChannelSession is one conversation between a contact and the AI, on whichever channel it happened — the web chat widget, email, WhatsApp or a voice call. It links to a Coworker when the contact is a member, and otherwise identifies them by ExternalIdentifier. The transcript lives in OpenAiChatMessage records sharing this record’s ChatSession GUID. Custom fields named Nexudus.Ai.VisitorId, Nexudus.Ai.CoworkerId, Nexudus.Ai.CoworkerContractId, Nexudus.Ai.CoworkerProductId and Nexudus.Ai.BookingId record what the conversation produced, so they are how you tell which conversations converted into a tour, a signup, a contract, a day pass or a booking. This entity is read-only: conversations are written by the inbound message pipeline and the proactive outreach engine, never by hand.

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

## Path Parameters

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

## Code Examples

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

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

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

## Response

### 200

<ResponseField name="BusinessId" type="integer">
  ID of the location that owns this conversation. Set from the location the inbound message arrived at, or from the location whose agent started the outreach..
</ResponseField>

<ResponseField name="CoworkerId" type="integer">
  ID of the customer this conversation is with. Empty when the contact is not a member yet, in which case ExternalIdentifier holds their email address or phone number..
</ResponseField>

<ResponseField name="CoworkerCoworkerType" type="string">
  Display value for Coworker.CoworkerType..
</ResponseField>

<ResponseField name="CoworkerFullName" type="string">
  Display value for Coworker.FullName..
</ResponseField>

<ResponseField name="CoworkerMobilePhone" type="string">
  Display value for Coworker.MobilePhone..
</ResponseField>

<ResponseField name="CoworkerLandLine" type="string">
  Display value for Coworker.LandLine..
</ResponseField>

<ResponseField name="CoworkerBillingName" type="string">
  Display value for Coworker.BillingName..
</ResponseField>

<ResponseField name="CoworkerCompanyName" type="string">
  Display value for Coworker.CompanyName..
</ResponseField>

<ResponseField name="CoworkerTeamNames" type="string">
  Display value for Coworker.TeamNames..
</ResponseField>

<ResponseField name="Channel" type="string">
  Channel the conversation runs on, stored as text: Chat for the web widget, Email, WhatsApp or Voice for inbound contact; proactive outreach also writes CoworkerMessage and HelpDesk. Determines how ExternalIdentifier is interpreted..
</ResponseField>

<ResponseField name="ExternalIdentifier" type="string">
  How the outside contact is addressed on this channel: an email address for Email, a phone number for WhatsApp and Voice. It is how a conversation is matched to an incoming reply, and how dormant non-member leads are followed up..
</ResponseField>

<ResponseField name="ChatSession" type="string">
  GUID that groups the conversation’s messages. Every OpenAiChatMessage in this conversation carries the same value, so it is the key to reading the transcript..
</ResponseField>

<ResponseField name="ExternalThreadId" type="string">
  Threading key from the channel provider — the email In-Reply-To/References header, or the WhatsApp conversation ID — used to attach later replies to this same conversation..
</ResponseField>

<ResponseField name="LastActivityUtc" type="string">
  UTC time of the most recent message in either direction. Drives conversation ordering, session expiry, and the dormant-lead follow-up agent..
</ResponseField>

<ResponseField name="Subject" type="string">
  Conversation subject, taken from the first email or inferred from the opening messages. On the Email channel a different subject from the same address starts a new conversation rather than continuing this one..
</ResponseField>

<ResponseField name="EscalationStatus" type="integer">
  How far this conversation has been handed over to a person: None while the AI is handling it alone; Pending once the AI escalates and a help desk ticket is waiting; Active once someone comments on that ticket or an operator takes the thread; Resolved when the ticket is closed.. See `eAiEscalationStatus` enum values: `1` = Pending, `2` = Active, `3` = Resolved.
</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,
  "CoworkerId": null,
  "CoworkerCoworkerType": null,
  "CoworkerFullName": null,
  "CoworkerMobilePhone": null,
  "CoworkerLandLine": null,
  "CoworkerBillingName": null,
  "CoworkerCompanyName": null,
  "CoworkerTeamNames": null,
  "Channel": "",
  "ExternalIdentifier": "",
  "ChatSession": null,
  "ExternalThreadId": null,
  "LastActivityUtc": null,
  "Subject": null,
  "EscalationStatus": 0,
  "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": "AiChannelSession Example",
  "LocalizationDetails": null,
  "CustomFields": null
}
```
