Skip to main content
GET
Get Session

Get Session

Retrieves detailed information about a specific chat session, including its status, topic, and metadata.

Endpoint

Authentication

string
required
Your Nexus API key for authentication

Path Parameters

string
required
The unique identifier of the session to retrieve

Response Fields

string
required
Unique identifier for the session
string
Auto-generated topic based on the conversation content. May be null for new sessions.
string
required
Current status of the session
  • ACTIVE - Session is active and can receive messages
  • EXPIRED - Session has expired due to inactivity
  • CLOSED - Session was manually closed
string
required
ISO 8601 timestamp of when the session was created
string
ISO 8601 timestamp of the most recent message in the session
number
Total number of messages in the conversation
object
Additional metadata about the session

Example Usage

Common Use Cases

1. Session Health Check

2. Session Monitoring

3. Session Analytics

Error Responses

Session Lifecycle

1

Creation

Session is created with status ACTIVE
2

Active Period

Session remains active for 24 hours after the last message
3

Expiration Warning

Sessions nearing expiration can be extended by sending a new message
4

Expiration

After 24 hours of inactivity, status changes to EXPIRED

Best Practices

  • Cache session information to reduce API calls
  • Invalidate cache when sending new messages
  • Set appropriate TTL based on your use case
  • Handle 404 errors gracefully
  • Don’t retry 404 errors
  • Log session IDs for debugging
  • Periodically check session status
  • Alert on unexpected session expiration
  • Track session metrics for optimization