Skip to main content
POST
Python
See Run a turn and Streaming events.

Authorizations

x-api-key
string
header
required

Headers

x-user-id
string | null

Optional user identifier to attribute clicks and sales to a user in your system. Channel3 appends it to buy URLs in the response.

Body

application/json

Run one turn. Without conversation_id a new thread is created first.

message
UserMessage · object
required
conversation_id
string | null

Existing thread to continue. When omitted, a new thread is created and its id returned.

filters
SearchFilters · object | null

Pinned catalog filters applied to every product search in this turn.

config
SearchConfig · object

Optional search configuration, including collection_id.

context
ConversationContext · object | null

Partner-supplied context pinned to the top of a conversation thread.

stream
boolean
default:true

Stream turn events over SSE (default) or return the assembled turn as JSON.

Response

text/event-stream of TurnEvent objects (one data: JSON frame each), terminated by data: [DONE]. With stream: false, a buffered TurnResult JSON body instead.

First event of every turn; carries the ids clients need to correlate.

conversation_id
string
required
turn_id
string
required
message_id
string
required
type
string
default:turn.started
Allowed value: "turn.started"