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

# Get active lock session

> Returns the currently active lock session for your account, including segment history. Returns `null` in the `data` field if no session is active.



## OpenAPI

````yaml https://dashboard.researchanddesire.com/openapi.yaml get /lkbx/session/current
openapi: 3.1.0
info:
  title: Research And Desire API
  description: >
    The Research And Desire API provides programmatic access to your devices and
    data.


    All responses follow a standard envelope format:

    - Success: `{ "ok": true, "data": <result> }`

    - Error: `{ "ok": false, "error": "<message>" }`


    ## Pagination


    List endpoints support pagination via query parameters:

    - `limit`: Number of records to return (default: 50, max: 100)

    - `offset`: Number of records to skip (default: 0)


    Paginated responses include pagination metadata alongside the data array.


    ## Authentication


    All endpoints require a Bearer token in the Authorization header.

    Tokens can be created in the Dashboard settings (requires Ultra
    subscription).
  version: 1.0.0
  contact:
    name: Research And Desire Support
    url: https://www.researchanddesire.com/support
servers:
  - url: https://dashboard.researchanddesire.com/api/v1
    description: Production API
security:
  - bearerAuth: []
tags:
  - name: Users
    description: User account information
  - name: DTT
    description: Deepthroat Trainer devices
  - name: DTT Templates
    description: Deepthroat Trainer training program templates
  - name: DTT Sessions
    description: Deepthroat Trainer training session history
  - name: LKBX
    description: Chastity Lockbox devices
  - name: Lock Templates
    description: Lock templates
  - name: Lock Sessions
    description: Lock session management
  - name: OSSM
    description: Open Source Sex Machine devices
paths:
  /lkbx/session/current:
    get:
      tags:
        - Lock Sessions
      summary: Get active lock session
      description: >-
        Returns the currently active lock session for your account, including
        segment history. Returns `null` in the `data` field if no session is
        active.
      operationId: getActiveLockSession
      responses:
        '200':
          description: Active lock session or null
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveLockSessionResponse'
              examples:
                activeSession:
                  summary: Active session exists
                  value:
                    ok: true
                    data:
                      id: 7
                      lockState: locked
                      duration: 172800
                      startDate: '2026-02-16T18:00:00Z'
                      isActive: true
                      LockSegment:
                        - type: start
                          createdAt: '2026-02-16T18:00:00Z'
                          isLocked: true
                noActiveSession:
                  summary: No active session
                  value:
                    ok: true
                    data: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                ok: false
                error: User not found
components:
  schemas:
    ActiveLockSessionResponse:
      type: object
      required:
        - ok
        - data
      properties:
        ok:
          type: boolean
          const: true
        data:
          oneOf:
            - $ref: '#/components/schemas/LockSessionDetail'
            - type: 'null'
    ErrorResponse:
      type: object
      required:
        - ok
        - error
      properties:
        ok:
          type: boolean
          const: false
        error:
          type: string
    LockSessionDetail:
      allOf:
        - $ref: '#/components/schemas/LockSessionSummary'
        - type: object
          properties:
            LockSegment:
              type: array
              items:
                $ref: '#/components/schemas/LockSegment'
    LockSessionSummary:
      type: object
      properties:
        id:
          type: integer
          description: Session ID
        bubbleId:
          type: string
          description: Unique public identifier
        publicId:
          type: string
          description: Public session ID
        ownerId:
          type: integer
          description: Owner user ID
        name:
          type: string
          description: Session name
        lockState:
          type: string
          enum:
            - pending
            - locked
            - completed
            - abandoned
            - break
          description: Current lock state
        duration:
          type: integer
          description: Lock duration in seconds
        startDate:
          type: string
          format: date-time
          nullable: true
          description: Session start time
        endDate:
          type: string
          format: date-time
          nullable: true
          description: Session end time
        isActive:
          type: boolean
          description: Whether session is active
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
    LockSegment:
      type: object
      properties:
        id:
          type: integer
        type:
          type: string
          description: Segment type (start, locked, break, unlocked)
        createdAt:
          type: string
          format: date-time
        isLocked:
          type: boolean
          description: Lock state during segment
  responses:
    Unauthorized:
      description: Authentication required or token invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            ok: false
            error: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        API tokens can be created in the Dashboard settings.
        Requires an Ultra subscription.

````