Skip to main content
POST
TypeScript SDK
Omit session_id to start a session, or provide one to add a message or submit a required action to an existing session.

Stream a session turn

Send the same request with Accept: text/event-stream to receive server-sent events instead of a JSON session response. Streaming supports replaying an event with continue_from; that field is only valid with the SSE response.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Notion-Version
enum<string>
required

The API version to use for this request. The latest version is 2026-03-11.

Available options:
2026-03-11

Body

application/json

Exactly one mode: append a message, answer pending actions, or replay from an event.

message
string
required
Maximum string length: 10000
agent_id
session_id
string
attachments
object[]
Maximum array length: 100
metadata
object
prompt_context
string
Maximum string length: 10000

Response

object
string
required

Always session

Allowed value: "session"
id
string
required
agent_id
string
required
title
string
required
status
enum<string>
required

One of: queued, in_progress, requires_action, completed, failed, canceled, terminated

Available options:
queued,
in_progress,
requires_action,
completed,
failed,
canceled,
terminated
created_at
string<date-time>
required
updated_at
string<date-time>
required
required_actions
object[]
Maximum array length: 100
error
object