Skip to main content
POST
/
api
/
v1
/
capture-session
Capture Session
curl --request POST \
  --url https://api.agnost.ai/api/v1/capture-session \
  --header 'Content-Type: application/json' \
  --header 'X-Org-Id: <api-key>' \
  --data '
{
  "session_id": "my-session-123",
  "user_data": {
    "user_id": "u-456",
    "email": "[email protected]",
    "role": "admin"
  },
  "client_config": "claude-desktop",
  "connection_type": "http",
  "tools": [
    "search_web",
    "get_weather"
  ]
}
'
{
  "session_id": "my-session-123"
}

Authorizations

X-Org-Id
string
header
required

Your organization ID (UUID) from app.agnost.ai

Body

application/json
session_id
string

Unique identifier for this session. Can be any string — normalized to a deterministic UUID internally so the same input always maps to the same UUID. Defaults to empty string if omitted.

Example:

"my-session-123"

user_data
object

Arbitrary key-value data about the user. Common fields: user_id (or userId), email, role. All values are stored as strings.

Example:
{
"user_id": "u-456",
"email": "[email protected]",
"role": "admin"
}
client_config
string

Name of the connecting client (e.g. "claude-desktop", "vscode").

Example:

"claude-desktop"

connection_type
string

Transport type (e.g. "http", "stdio").

Example:

"http"

tools
string[]

List of tool names available in this session.

Example:
["search_web", "get_weather"]

Response

Session created successfully

session_id
string

Echo of the session_id from the request.

Example:

"my-session-123"