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

# Create product_access

> Create a [product_access](/concepts/product_access) for a user



## OpenAPI

````yaml POST /product_access/create
openapi: 3.0.0
info:
  version: 2.0.0
  title: illuxiLMS API
  description: Interact with the illuxiLMS API to manage your learning content and users.
  termsOfService: https://illuxi.com/conditions-utilisation/
  contact:
    name: illuxi Team
    email: info@illuxi.com
    url: https://illuxi.com
servers:
  - url: https://{portalApiUrl}
    description: Production server (uses live data)
    variables:
      portalApiUrl:
        default: your-portal.acme.com/api-v2
        description: Your portal's API URL
security:
  - bearerAuth: []
paths:
  /product_access/create:
    post:
      description: Create a [product_access](/concepts/product_access) for a user
      operationId: createProductAccess
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - product_id
              properties:
                email:
                  type: string
                  description: Email of the user to grant access to
                external_id:
                  type: integer
                  nullable: true
                  description: External identifier for the access record
                product_id:
                  type: integer
                  description: ID of the product to grant access to
                invoice_id:
                  type: integer
                  nullable: true
                  description: Associated invoice ID
                registration_id:
                  type: integer
                  nullable: true
                  description: Associated registration ID
                source:
                  type: string
                  nullable: true
                  description: Source system that triggered the access creation
            example:
              email: user@example.com
              product_id: 5693
              registration_id: 169116
              source: api
      responses:
        '201':
          description: product_access created
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: boolean
                  result:
                    $ref: '#/components/schemas/ProductAccess'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ProductAccess:
      type: object
      properties:
        product_access_id:
          type: integer
          description: Unique identifier of the product access record
          readOnly: true
        product_access_product_id:
          type: integer
          description: ID of the product this access grants
        product_access_user_id:
          type: integer
          description: ID of the user who has access
          readOnly: true
        product_access_status:
          type: string
          description: Status of the access record
          enum:
            - active
            - inactive
            - expired
        product_access_certificate:
          type: string
          nullable: true
          description: Whether a certificate was issued (1 = yes)
        product_access_created_date:
          type: string
          format: date-time
          readOnly: true
          description: Date the access was created
        product_access_updated_date:
          type: string
          format: date-time
          readOnly: true
          description: Date the access was last updated
        product_access_expired_date:
          type: string
          format: date-time
          nullable: true
          description: Date the access expires
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Authentication token obtained from POST /token

````