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

> ## Agent Instructions
> These docs cover learner integrations through Hosted Lab Pages, the SDK, and the REST API. Content management is outside this integration scope.
> Read the setup page for the chosen approach before implementing it. Keep organization API keys and hosted mint secrets on the server.
> The public SDK is coming soon. Check the SDK quickstart for current availability. Do not invent installation commands or direct readers to a private package.
> Cybr provides completion tracking and CTF verification. The integrating platform decides whether to award points.

# Record completion

> Records application-reported completion. Existing completion returns the same response. This is not a unique scoring event. SDK: `labs.markCompleted()`.

SDK: `labs.markCompleted()`.


## OpenAPI

````yaml assets/openapi.json POST /api/v2/labs/{labId}/complete
openapi: 3.1.0
info:
  title: Cybr Labs public integration API
  version: 0.0.15
  description: SDK and REST integration contract. Organization keys remain on the server.
  contact:
    email: support@cybr.com
servers:
  - url: https://api.cybr.com
security:
  - OrganizationKey: []
tags:
  - name: Labs
    description: Content, progress, discussions, and resource links.
  - name: Deployments
    description: Lab environments and terminal sessions.
paths:
  /api/v2/labs/{labId}/complete:
    post:
      tags:
        - Labs
      summary: Record completion
      description: >-
        Records application-reported completion. Existing completion returns the
        same response. This is not a unique scoring event. SDK:
        `labs.markCompleted()`.
      operationId: record_completion
      parameters:
        - name: labId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompletionRequest'
            example:
              learnerId: academy:user:uuid
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompletionResponse'
              example:
                message: COMPLETED
        '400':
          description: Invalid learner ID or malformed JSON.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Lab not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: Request body exceeds 1,000,000 UTF-8 bytes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: COMPLETION_RECORD_FAILED or server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: Other API error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CompletionRequest:
      type: object
      properties:
        learnerId:
          type: string
      required:
        - learnerId
    CompletionResponse:
      type: object
      properties:
        message:
          const: COMPLETED
          type: string
      required:
        - message
    Error:
      type: object
      properties:
        message:
          type: string
        retryAfter:
          type: number
        activeCount:
          type: integer
        limit:
          type: integer
        errors:
          type: array
          items:
            type: string
      required:
        - message
  securitySchemes:
    OrganizationKey:
      type: apiKey
      in: header
      name: X-API-Key

````