Get Session
Endpoints
Get Session
Retrieve information about a specific chat session
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 messagesEXPIRED- Session has expired due to inactivityCLOSED- 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
ACTIVE2
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
EXPIREDBest Practices
Caching
Caching
- Cache session information to reduce API calls
- Invalidate cache when sending new messages
- Set appropriate TTL based on your use case
Error Handling
Error Handling
- Handle 404 errors gracefully
- Don’t retry 404 errors
- Log session IDs for debugging
Monitoring
Monitoring
- Periodically check session status
- Alert on unexpected session expiration
- Track session metrics for optimization
Related Endpoints
- Create Session - Create a new chat session
- Send Message - Send messages to the session
- List Messages - Get conversation history