Skip to main content
POST
Preset Assistant Start

Authorizations

Authorization
string
header
required

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

Path Parameters

preset_id
string
required

Body

application/json
surface
string | null
language
string | null

The conversation's language ('fr', 'en', 'darija', 'es'; 'fr' when omitted on a create). On a RESUME, supplying a different supported language SWITCHES the conversation to it; omitting the field keeps the session's own language. Two consequences of switching, both deliberate: it is refused with 409 turn_in_flight while a turn is running (the running turn already answers in the old language), and it can invalidate a voice surface -- a session whose language is not voice-enabled cannot mint a voice ticket, so switching to one strands any voice client on that conversation. Send it only when the user really changed language.

fresh
boolean
default:false

Issue #237: /start returns the SAME open session for this subject by default (resumed: true). Set fresh=true to close it and start a brand-new conversation instead (resumed: false). No effect when no session is open, and no effect at all on a sandbox key (sk_test_ always creates). Refused with 409 turn_in_flight while a turn is still running on the conversation.

Response

RESUMED: an open conversation for this preset already existed and is returned as it stands (resumed: true). 201 means a new one was created.