Get First Message
Chat
Get First Message
Retrieve the agent’s greeting message to initialize a chat session
GET
Get First Message
Overview
This endpoint retrieves the agent’s first/greeting message that should be displayed when starting a new chat. Use this to initialize your chat UI before the user sends their first message, providing a welcoming experience.Authentication
string
required
Your eigi.ai API key. Must be prefixed with
vk_.Path Parameters
string
required
The unique identifier of the agent. Example:
68ea2517dbb84c09bae1ba0aResponse
string
A new session ID created for this chat. Use this for subsequent messages.
string
The agent’s greeting/welcome message configured in the agent settings.
string
The agent ID (same as the request parameter).
Examples
Get Agent’s First Message
Response Example
Typical Workflow
Here’s how to properly initialize a chat conversation:1
Get First Message
Call this endpoint when a user opens your chat interface.
2
Display Greeting
Show the
first_message to the user in your chat UI.3
Store Session ID
Save the
session_id for use in subsequent messages.4
Continue Chat
When the user sends a message, use the stored
session_id with the chat
endpoint.Complete Chat Flow Example
JavaScript
Error Responses
Example Error Response
Best Practices
Authorizations
API key for authentication. Get your API key from the eigi.ai Dashboard under Settings → API Keys.
Path Parameters
The unique agent ID

