> ## 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.

# Course Assistant Voice Ticket

> Issue a short-lived, single-use WebSocket credential for an existing
voice-capable assistant session (creator plane only in this wave; the
learn-plane exam ticket is Phase 3 / Wave 6).

Browsers cannot set custom headers on `new WebSocket()`, so a normal
Bearer key cannot authenticate the socket. This ticket is the bridge:
24 random bytes, returned ONCE, stored only as its SHA-256 hash, valid
for `expires_in` seconds and consumable exactly once. Redeem it as
`GET /api/v1/voice?ticket=<value>`.

404 if the session does not exist, is not owned by this account, or
does not belong to this course. 400 `voice_language_unavailable` if the
session's language is not (yet) voice-capable
(see `enabled_languages` in the error body); the text assistant is
unaffected, only the voice modality is refused.



## OpenAPI

````yaml /openapi.yaml post /api/v1/courses/{course_id}/assistant/{session_id}/voice/ticket
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/courses/{course_id}/assistant/{session_id}/voice/ticket:
    post:
      tags:
        - Voice
      summary: Course Assistant Voice Ticket
      description: |-
        Issue a short-lived, single-use WebSocket credential for an existing
        voice-capable assistant session (creator plane only in this wave; the
        learn-plane exam ticket is Phase 3 / Wave 6).

        Browsers cannot set custom headers on `new WebSocket()`, so a normal
        Bearer key cannot authenticate the socket. This ticket is the bridge:
        24 random bytes, returned ONCE, stored only as its SHA-256 hash, valid
        for `expires_in` seconds and consumable exactly once. Redeem it as
        `GET /api/v1/voice?ticket=<value>`.

        404 if the session does not exist, is not owned by this account, or
        does not belong to this course. 400 `voice_language_unavailable` if the
        session's language is not (yet) voice-capable
        (see `enabled_languages` in the error body); the text assistant is
        unaffected, only the voice modality is refused.
      operationId: >-
        course_assistant_voice_ticket_api_v1_courses__course_id__assistant__session_id__voice_ticket_post
      parameters:
        - name: course_id
          in: path
          required: true
          schema:
            type: string
            title: Course Id
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Course Assistant Voice Ticket Api V1 Courses  Course
                  Id  Assistant  Session Id  Voice Ticket Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````