Skip to main content
POST
Create session

Autorizações

X-API-Key
string
header
obrigatório

Parâmetros de caminho

agent_id
string
obrigatório

Corpo

application/json
user
SessionUser · object | null

Reference to a user when creating a session. Lookup-only. Use POST /users to create users.

context
Context · object | null

Free-form key/value pairs injected into the agent's system context for this session. Use for plan tier, language, channel, etc.

metadata
Metadata · object | null

Free-form storage for the integrator. Saved with the session and returned on read. Not seen by the agent.

Resposta

Successful Response

id
string
obrigatório
agent_id
string
obrigatório
status
enum<string>
obrigatório
Opções disponíveis:
active,
closed,
expired
created_at
string<date-time>
obrigatório
updated_at
string<date-time>
obrigatório
user
UserSummary · object | null
messages_count
integer
padrão:0
last_message_at
string<date-time> | null
closed_at
string<date-time> | null
context
Context · object | null
metadata
Metadata · object | null