Skip to main content
GET
/
v1
/
public
/
chat
/
sessions
/
{session_id}
Get Chat Session
curl --request GET \
  --url https://prod.eigi.ai/v1/public/chat/sessions/{session_id} \
  --header 'X-API-Key: <api-key>'
{
  "session_id": "<string>",
  "agent_id": "<string>",
  "status": "IN_PROGRESS",
  "messages": [
    {
      "role": "user",
      "content": "<string>",
      "timestamp": "2023-11-07T05:31:56Z"
    }
  ],
  "message_count": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "metadata": {}
}

Overview

This endpoint retrieves the complete chat session including all messages, status, and metadata. Use it to review conversation history, display chat transcripts, or sync session data with external systems.

Authentication

X-API-Key
string
required
Your eigi.ai API key. Must be prefixed with vk_.

Path Parameters

session_id
string
required
The unique identifier of the chat session to retrieve. Example: 58a6b549-ef07-4a31-86bc-0eb0e026840a

Response

session_id
string
Unique identifier for the chat session.
agent_id
string
ID of the agent handling this session.
status
string
Current session status. One of: IN_PROGRESS, COMPLETED, DISCONNECTED, FAILED.
messages
array
Array of all messages in the session.
message_count
integer
Total number of messages in the session.
created_at
string
ISO 8601 timestamp when the session was created.
updated_at
string
ISO 8601 timestamp when the session was last updated.
metadata
object
Custom metadata attached to the session.

Message Object

Each message in the messages array contains:
role
string
Who sent the message: user or assistant.
content
string
The text content of the message.
timestamp
string
ISO 8601 timestamp when the message was sent.

Examples

Get Session Details

curl -X GET "https://prod.eigi.ai/v1/public/chat/sessions/58a6b549-ef07-4a31-86bc-0eb0e026840a" \
  -H "X-API-Key: vk_your_api_key_here"

Response Example

{
  "session_id": "58a6b549-ef07-4a31-86bc-0eb0e026840a",
  "agent_id": "68ea2517dbb84c09bae1ba0a",
  "status": "IN_PROGRESS",
  "messages": [
    {
      "role": "assistant",
      "content": "Hello! Welcome to our support. How can I help you today?",
      "timestamp": "2025-12-05T10:00:00.000Z"
    },
    {
      "role": "user",
      "content": "I need help resetting my password",
      "timestamp": "2025-12-05T10:00:15.000Z"
    },
    {
      "role": "assistant",
      "content": "I'd be happy to help you reset your password. Could you please provide the email address associated with your account?",
      "timestamp": "2025-12-05T10:00:17.000Z"
    },
    {
      "role": "user",
      "content": "It's john@example.com",
      "timestamp": "2025-12-05T10:00:30.000Z"
    },
    {
      "role": "assistant",
      "content": "Thank you! I've sent a password reset link to john@example.com. Please check your inbox and follow the instructions. The link will expire in 24 hours. Is there anything else I can help you with?",
      "timestamp": "2025-12-05T10:00:33.000Z"
    }
  ],
  "message_count": 5,
  "created_at": "2025-12-05T10:00:00.000Z",
  "updated_at": "2025-12-05T10:00:33.000Z",
  "metadata": {
    "user_id": "user_123",
    "source": "website"
  }
}

Error Responses

Status CodeDescription
400 Bad RequestThe specified session is not a chat session (e.g., it’s a voice call)
401 UnauthorizedMissing, invalid, inactive, or expired API key
403 ForbiddenAPI key owner doesn’t have access to this session
404 Not FoundSession not found with the given ID
Example Error Response
{
  "detail": "Session not found"
}

Use Cases

Chat History

Display full conversation history to users

Export Transcripts

Export chat transcripts for records or analysis

Resume Conversations

Continue conversations from where they left off

Support Handoff

Review context before human agent takeover

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your API key from the eigi.ai Dashboard under Settings → API Keys.

Path Parameters

session_id
string
required

The unique session ID

Response

Successfully retrieved chat session

session_id
string

Unique session identifier

agent_id
string

ID of the agent

status
enum<string>

Session status

Available options:
IN_PROGRESS,
COMPLETED,
DISCONNECTED,
FAILED
messages
object[]
message_count
integer
created_at
string<date-time>
updated_at
string<date-time>
metadata
object