Sessions
Create a session
Creates a new session for the specified agent, along with the underlying conversation, so the caller only needs this single call to start interacting with the agent. No actor is created: pass actor_id to attach an existing actor as the session's end user. When it is omitted the session has no actor, and generations in it carry no end-user attribution — they are not billed to an actor in the usage meter and they match no actor-scoped quota.
post/v1/projects/{project_id}/sessions
Request
- Base URL: https://api.naturali.ai
- URL: https://api.naturali.ai/v1/projects/{project_id}/sessions
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://api.naturali.ai/authorize, token URL https://api.naturali.ai/token, scopes: mcp:access)
Request body
Example request
{
"agent_id": "agent_V1StGXR8Z5jdHi6B",
"name": "Support chat",
"tags": {
"team": "finance",
"env": "prod"
},
"actor_id": "actor_V1StGXR8Z5jdHi6B",
"inactivity_ttl_seconds": 300,
"message_delay_seconds": 3,
"max_context_messages": 20
}Response
Session created
Example response
{
"id": "sess_V1StGXR8Z5jdHi6B",
"agent_id": "agent_V1StGXR8Z5jdHi6B",
"conversation_id": "conv_V1StGXR8Z5jdHi6B",
"status": "open",
"name": "Support chat",
"actor_id": "actor_V1StGXR8Z5jdHi6B",
"tags": {
"team": "finance",
"env": "prod"
},
"inactivity_ttl_seconds": 300,
"message_delay_seconds": 3,
"max_context_messages": 20,
"forked_from_session_id": "sess_V1StGXR8Z5jdHi6B",
"forked_from_position": 7
}Changes
No recorded changes to this operation across all 1 revision of this API.