Service endpoints
Calling a service endpoints lets you:
Initiate a session*
Description: Start a new conversation session with your AI agent.
URL: POST https://agents.gigaml.com/webhook/initiate-session
Response codes:
200 OK
: Session initiated successfully or session already exists401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error
Description: Start a new conversation session with your AI agent.
URL: POST https://agents.gigaml.com/webhook/initiate-session
Response codes:
200 OK
: Session initiated successfully or session already exists401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error
Parameter | Type | Required | Description |
---|---|---|---|
ticket_id | string | Yes | A unique identifier for this conversation session |
agent_id | string | Yes | The ID of the agent to use for this conversation |
initialization_values | object | No | Optional key-value pairs your agent needs to start the conversation |
Receive a message*
Description: Receive a user message from an active conversation session.
URL: POST https://agents.gigaml.com/webhook/receive-message
Response codes:
200 OK
: Message queued successfully or message already processed404 Not Found
: Session not found401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error
Description: Receive a user message from an active conversation session.
URL: POST https://agents.gigaml.com/webhook/receive-message
Response codes:
200 OK
: Message queued successfully or message already processed404 Not Found
: Session not found401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error
Parameter | Type | Required | Description |
---|---|---|---|
ticket_id | string | Yes | The identifier for the conversation session |
message_id | string | Yes | A unique identifier for this message |
message | object | Yes | The message object containing role, content, and timestamp |
Message object:
Field | Type | Required | Description |
---|---|---|---|
role | Literal[“user”] | Yes | The role of the message sender |
content | string or array | Yes | The message content (text or structured content) |
timestamp | number | No | Unix timestamp in milliseconds |
Close a session
Description: End an existing conversation session. Inactive conversations end after 1 hour by default.
URL: POST https://agents.gigaml.com/webhook/close-session
Response codes:
200 OK
: Session closed successfully404 Not Found
: Session not found401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error
Description: End an existing conversation session. Inactive conversations end after 1 hour by default.
URL: POST https://agents.gigaml.com/webhook/close-session
Response codes:
200 OK
: Session closed successfully404 Not Found
: Session not found401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error
Parameter | Type | Required | Description |
---|---|---|---|
ticket_id | string | Yes | The identifier for the conversation session |
reason | string | Yes | The reason for closing the session |
status | string | Yes | Enum defining how the session was closed for logging |