v3

latestOpenAPI 3.0.02026-08-081996601.2 MB
Agent End User Sessions

Create end user session for alias

Creates a session owned by the calling end user, routed through this alias's policy. The session's owning principal is the caller's authenticated identity. Ownership binds to the alias key, not the resolved agent, so it is unaffected by a later change to the alias's routing weights. Returns 429 when the caller reaches the live-session or hourly session-creation cap.

post/v2/agent_aliases/{alias_key}/end_user_sessions

Path parameters

alias_keystring required

The unique key that identifies an alias. Alias keys are independent of agent keys. The same string can exist as both an alias key and an agent key in the same customer account. Calls to /v2/agent_aliases/{key}/... target the alias. Calls to /v2/agents/{key}/... target the agent.

Example:support

The unique key of the alias to create a session for.

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Request body

namestring

Human-readable name for the session. Platform-generated if omitted.

descriptionstring

A short description of the session's purpose. If omitted, the platform generates one after the agent produces events.

Example request

{
  "name": "Customer Support Session",
  "description": "Helping customer troubleshoot widget installation issues"
}

Response

The newly created session.

keystring required

A unique key that identifies an agent session.

namestring required

Human-readable name for the session.

descriptionstring

A short description of the session's purpose.

enabledboolean required

Whether the session is currently active and can accept new messages.

status'unstarted' | 'running' | 'stopped'

Lifecycle status of the session. unstarted before the session receives any event, running while the agent is producing events, and stopped when the session is idle with no event in flight.

tti_minutesinteger

Time-to-idle in minutes for the session. If no events occur in the session for this duration, the session is automatically deleted. If set to 0, the session does not expire.

created_atstring date-time required

Timestamp when the session was created.

Example response

{
  "key": "customer_support_chat",
  "name": "Customer Support Session",
  "description": "Helping customer troubleshoot widget installation issues",
  "enabled": true,
  "status": "stopped",
  "tti_minutes": 60,
  "created_at": "2024-01-15T10:30:00Z"
}