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

# Create manufacturer link session

> Create a new link session to connect a user of a manufacturer, with the intend to authenticate with the energy supplier. The returned `link_url` should be used to redirect the end-user to the NOX Authenticator UI.



## OpenAPI

````yaml /api-docs/manufacturer-integration/openapi-manufacturer-auth-v2.json post /manufacturer/link-sessions
openapi: 3.0.3
info:
  title: NOX Authenticator API — Manufacturer
  description: >-
    Endpoints for device manufacturers to create link sessions and device
    connections.
  version: 2.0.0
  contact:
    name: NOX Energy
servers:
  - url: https://auth.nox.energy/v2
    description: Production
security: []
tags:
  - name: Manufacturer
    description: >-
      Endpoints for device manufacturers to create link sessions and device
      connections.
paths:
  /manufacturer/link-sessions:
    post:
      tags:
        - Manufacturer
      summary: Create manufacturer link session
      description: >-
        Create a new link session to connect a user of a manufacturer, with the
        intend to authenticate with the energy supplier. The returned `link_url`
        should be used to redirect the end-user to the NOX Authenticator UI.
      operationId: createManufacturerLinkSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateManufacturerLinkSessionRequest'
      responses:
        '201':
          description: Link session created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateManufacturerLinkSessionResponse'
        '400':
          description: Validation error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: user_id is required
        '401':
          description: Missing or invalid API key, or manufacturer not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Invalid API key
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateManufacturerLinkSessionRequest:
      type: object
      required:
        - user_id
        - redirect_url
      properties:
        user_id:
          type: string
          description: The manufacturer's internal user ID for the end-user.
          example: manufacturer_user_id_123
        language:
          $ref: '#/components/schemas/Language'
        redirect_url:
          type: string
          format: uri
          description: Callback URL where the user is redirected after completing the flow.
          example: https://your-app.com/callback
    CreateManufacturerLinkSessionResponse:
      type: object
      required:
        - link_url
        - link_token
        - manufacturer
        - manufacturer_user_id
        - redirect_url
        - language
        - created_at
        - expires_at
      properties:
        link_url:
          type: string
          format: uri
          description: Full URL to redirect the end-user to the NOX Authenticator UI.
          example: https://auth.nox.energy/ui?token=abc123&language=nl
        link_token:
          type: string
          description: Unique token identifying this link session.
          example: abc123
        brand:
          type: string
          description: The manufacturer's brand name (title-cased).
          example: Acme Manufacturing
        language:
          $ref: '#/components/schemas/Language'
        redirect_url:
          type: string
          format: uri
          description: The redirect URL that was provided.
          example: https://your-app.com/callback
        manufacturer:
          type: string
          description: Name of the manufacturer (resolved from API key).
          example: Acme Manufacturing
        manufacturer_user_id:
          type: string
          description: The manufacturer's user ID.
          example: manufacturer_user_id_123
        completed_at:
          type: integer
          description: >-
            Unix timestamp when the session was completed. Always `null` on
            creation.
          nullable: true
        created_at:
          type: integer
          description: Unix timestamp when the session was created.
          example: 1703123456
        expires_at:
          type: integer
          description: Unix timestamp when the session expires (10 minutes after creation).
          example: 1703124056
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
    Language:
      type: string
      enum:
        - nl
        - en
        - fr
        - es
      default: nl
      description: Language for the Authenticator UI.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key assigned to the manufacturer.

````