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

# Get Xapi Launch Url

> Generate a launch URL for a CloudFront-hosted xAPI course.

This endpoint:
1. Validates user has an active assignment with this course
2. Delegates to XApiService which:
   - Gets or creates a registration record
   - Mints a 7-day xAPI session token
   - Generates launch URL with xAPI parameters
   - Generates CloudFront signed cookies

The Articulate player will use the embedded xAPI params to send
statements to the API Gateway LRS endpoint.



## OpenAPI

````yaml /openapi.json post /api/v1/learn/xapi/launch
openapi: 3.1.0
info:
  title: Seamind Backend
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/learn/xapi/launch:
    post:
      tags:
        - learn-xapi
      summary: Get Xapi Launch Url
      description: |-
        Generate a launch URL for a CloudFront-hosted xAPI course.

        This endpoint:
        1. Validates user has an active assignment with this course
        2. Delegates to XApiService which:
           - Gets or creates a registration record
           - Mints a 7-day xAPI session token
           - Generates launch URL with xAPI parameters
           - Generates CloudFront signed cookies

        The Articulate player will use the embedded xAPI params to send
        statements to the API Gateway LRS endpoint.
      operationId: get_xapi_launch_url_api_v1_learn_xapi_launch_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/XApiLaunchRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/XApiLaunchResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    XApiLaunchRequest:
      properties:
        courseId:
          type: string
          format: uuid
          title: Courseid
      type: object
      required:
        - courseId
      title: XApiLaunchRequest
      description: Request to launch an xAPI course
    XApiLaunchResponse:
      properties:
        launchUrl:
          type: string
          title: Launchurl
        cookiePolicy:
          anyOf:
            - type: string
            - type: 'null'
          title: Cookiepolicy
        cookieSignature:
          anyOf:
            - type: string
            - type: 'null'
          title: Cookiesignature
        cookieKeyPairId:
          anyOf:
            - type: string
            - type: 'null'
          title: Cookiekeypairid
        registrationId:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Registrationid
      type: object
      required:
        - launchUrl
      title: XApiLaunchResponse
      description: Response containing xAPI launch URL and CloudFront signed cookie data
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````