Create a Session
Establishes a new conversation session for a specific user with the Agentic App. Note: This is the starting point for any new interaction.| Field | Value |
|---|---|
| Endpoint | https://domain/api/v2/apps/{{appId}}/environments/{{envName}}/sessions |
| Content-type | application/json |
| Authorization Header | x-api-key: API-KEY> |
Path Parameters
| Fields | Description |
|---|---|
| AppID | Unique Identifier for the app. |
| EnvName | Name of the environment to be used for the agent. |
Request Parameters
| Fields | Description |
|---|---|
| sessionIdentity | This is an array of objects with a type and value used to identify or create sessions and manage user session mappings. The three supported identifier types are: The objects can be of three types:
|
| source(optional) | Identifies the system from which the API request is initiated. This field enables better analytics, monitoring, and observability by indicating what triggered the agentic app execution. This field is available as a filter in the session logs. If not provided, the Platform automatically assigns the default value. Recommended Values:
|
Sample Request
Response
Returns details of the newly created session, which are required for managing and continuing conversations. The response also includes document upload configuration and allowed file types, enabling clients to validate uploads in advance and prevent unnecessary failures. The fields in the response include:- session - Metadata about the created session.
- sessionId - A unique identifier for the session.
- Status - Indicates the current state of the session. Possible values:
idle,busy,error. - sessionReference - A unique reference string associated with the session for easier cross-request tracking.
- userReference - Unique reference string for the user associated with the session.
- userId - Internal system-generated identifier for the user.
- createdAt - Timestamp indicating when the session was created.
- allowedMimeTypes - List of supported file formats for uploads.
- fileUploadConfig - File Upload rules configured for the app. These rules apply to both types of documents - uploaded for context extraction and for Metadata generation. The following fields are available in this field.
- maxFileCount - Max number of files that can be uploaded.
- maxFileSize - Max size of each file that can be uploaded. The value is in MBs.
- maxTokens - Specifies the maximum allowed combined size of all uploaded files, measured in tokens. If the total token size exceeds this limit, only files that comply with the threshold are uploaded; files exceeding it will be rejected.
Sample Response
IDP_Redirect. This event provides a URL that the user must visit to complete the authorization process. If the required authorization isn’t completed, the associated tools will return an error upon invocation.
List Sessions
Lists sessions for the selected app and environment. Supports optional filters such as session ID, user reference, and date range.| Field | Value |
|---|---|
| Endpoint | POST https://your-domain/api/public/apps/:appId/sessions/list |
| Content-Type | application/json |
| Authorization Header | x-api-key: <API-KEY> |
Path Parameters
| Fields | Description |
|---|---|
| AppID | Unique Identifier for the app. |
Query Parameters
| Field | Type | Description | Mandatory |
|---|---|---|---|
| offset | number | Number of records to skip before starting to return results. Used for pagination. Default is 0. | No |
| limit | number | Maximum number of records to return in a single response. Accepted range: 1–100. Default is 20. | No |
Request Parameters
All fields are optional. Send{} to use defaults.
| Field | Type | Description |
|---|---|---|
| env_name | string | Environment name (mandatory). Case-insensitive. |
| start_time | string | Start of the date range for session retrieval. Must be in ISO 8601 format (for example: 2026-04-01T00:00:00.000Z). Defaults to 24 hours before end_time. |
| end_time | string | End of the date range for session retrieval. Must be in ISO 8601 format. Defaults to the current time. |
| user_reference_id | string | Filter sessions by user reference. |
| session_reference_id | string | Filter sessions by custom session reference. |
Sample Request
Response Parameters
| Field | Type | Description | |
|---|---|---|---|
sessions | array | Array of session objects matching the filters. | |
sessions[].session_id | string | Unique session identifier (starts with s-). | |
sessions[].session_reference_id | string | Custom session reference ID. Empty string if not set. | |
sessions[].user_reference_id | string | User identifier associated with the session. | |
sessions[].env_name | string | Environment name where the session was created. | |
sessions[].start_time | string | Session start timestamp in ISO 8601 format. | |
sessions[].end_time | string | null | Session end timestamp in ISO 8601 format. null if the session is still active. |
sessions[].last_activity_at | string | Last activity timestamp in ISO 8601 format. | |
sessions[].source | string | null | Session source identifier (for example, AP for API). |
total_count | number | Total number of sessions matching the filters. Use for pagination. |
Sample Response
Terminate Session
Terminates a given session. It also deletes the associated session-specific memory data.| Field | Value |
|---|---|
| Endpoint | https://domain/api/v2/apps/{{appId}}/environments/{{envName}}/sessions/terminate |
| Content-type | application/json |
| Authorization Header | x-api-key: <API-KEY> |
Path Parameters
| Fields | Description |
|---|---|
| AppID | Unique Identifier for the app. |
| EnvName | The name of the environment in which the application will run. |
Request Parameters
| Fields | Description | Mandatory |
|---|---|---|
| sessionIdentity | Provide the sessionReference or sessionId to uniquely identify the session to be terminated. Do not use userReference. | Yes |