> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myustadia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preset Assistant Turn

> One assistant turn on a preset (profile) session.

A preset session has no course documents, so it never carries a
`suggestion` and a bare `confirm` (no `value`) is rejected with 400
`confirm_no_candidate`; a `confirm` WITH a value is validated and recorded
exactly like a typed answer (`source='text'`, zero model calls).



## OpenAPI

````yaml /openapi.yaml post /api/v1/presets/{preset_id}/assistant/{session_id}/turn
openapi: 3.1.0
info:
  title: Mahara Platform
  description: >
    AI Sales Training Course Generator, a Coursera-style platform.


    ## Authentication


    Every request must carry your API key as a Bearer token:


    `Authorization: Bearer sk_live_your_key_here`


    ## Getting an API key


    API keys are provisioned by our team. They are not self-service, so there is
    no signup page to apply on. To request access, email **sales@myustadia.com**
    and we will issue a key for your account.
  version: 1.0.0
servers: []
security: []
paths:
  /api/v1/presets/{preset_id}/assistant/{session_id}/turn:
    post:
      tags:
        - B2B Assistant
      summary: Preset Assistant Turn
      description: >-
        One assistant turn on a preset (profile) session.


        A preset session has no course documents, so it never carries a

        `suggestion` and a bare `confirm` (no `value`) is rejected with 400

        `confirm_no_candidate`; a `confirm` WITH a value is validated and
        recorded

        exactly like a typed answer (`source='text'`, zero model calls).
      operationId: >-
        preset_assistant_turn_api_v1_presets__preset_id__assistant__session_id__turn_post
      parameters:
        - name: preset_id
          in: path
          required: true
          schema:
            type: string
            title: Preset Id
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TurnRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TurnRequest:
      properties:
        client_turn_id:
          type: string
          maxLength: 128
          minLength: 1
          title: Client Turn Id
        message:
          type: string
          maxLength: 8000
          title: Message
          default: ''
        confirm:
          anyOf:
            - $ref: '#/components/schemas/Confirm'
            - type: 'null'
          description: >-
            Explicit confirmation of the served question's document suggestion.
            A confirm turn makes zero model calls; the answer is validated and
            recorded by the server exactly as a typed answer would be
            (source='text').
      type: object
      required:
        - client_turn_id
      title: TurnRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Confirm:
      properties:
        question_id:
          type: string
          maxLength: 64
          minLength: 1
          title: Question Id
          description: >-
            Must equal the question currently served to this session; any other
            id is rejected with 400 confirm_not_current.
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
          description: >-
            The client-edited value to record. Omit (or null) to record the
            suggestion's stored candidate as shown. A confirm with no stored
            candidate and no value is rejected with 400 confirm_no_candidate.
      type: object
      required:
        - question_id
      title: Confirm
      description: >-
        The explicit confirmation of a document-derived suggestion (doc-digest

        design 4.2). This is the SOLE structural write channel for a doc value:
        it is

        an HTTP-supplied field the turn model cannot emit (it exists in no tool

        schema), so no document injection can forge it. When present, the ROUTE
        runs

        the identical gate a typed answer runs (answer_ok, then the engine
        submit and

        record with source='text') and makes ZERO model calls.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````