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

# SDK Settings

> Configure the liveness-check behavior (security threshold, which actions to require, whether to randomize them, how many, and per-action duration) used by the Anti-Deepfake Liveness SDK.



## OpenAPI

````yaml /api-reference/specs/sdk.json post /v2/sdk/identity/liveness/settings
openapi: 3.0.3
info:
  title: Youverify SDK Utilities API
  version: 2.0.0
  description: >-
    Server-side helper endpoints used by Youverify's mobile/web Liveness SDKs:
    configuring liveness behavior, minting SDK session tokens, and reviewing
    liveness-check history. Assembled from
    doc.youverify.co/api-reference-sdk/sdk, kept in the exact order they appear
    in the GitBook navigation (SDK Settings → Generate SDK Liveness Token →
    Generate SDK Session ID → Liveness History). 401/429/500 are account-wide
    errors sourced verbatim from Youverify's "Youverify OS Error Codes" page and
    attached to every operation; 402 is attached to POST operations; any error a
    specific page actually showed (e.g. the 404 on SDK Settings and Liveness
    History) is kept exactly as documented there.
  contact:
    name: Youverify Support
    email: support@youverify.co
servers:
  - url: https://api.youverify.co
    description: Production (live, billed)
  - url: https://api.sandbox.youverify.co
    description: Sandbox (test data, not billed)
security:
  - ApiKeyAuth: []
tags:
  - name: SDK Utilities
    description: Server-side helper endpoints used by the mobile/web SDKs.
paths:
  /v2/sdk/identity/liveness/settings:
    post:
      tags:
        - SDK Utilities
      summary: SDK Settings
      description: >-
        Configure the liveness-check behavior (security threshold, which actions
        to require, whether to randomize them, how many, and per-action
        duration) used by the Anti-Deepfake Liveness SDK.
      operationId: updateSdkLivenessSettings
      parameters:
        - name: token
          in: header
          required: true
          schema:
            type: string
          description: API secret token
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                threshold:
                  type: string
                  description: 'Security threshold for liveness detection. Default: "low".'
                  enum:
                    - low
                    - mid
                    - high
                actions:
                  type: array
                  description: Liveness actions to require.
                  items:
                    type: string
                    enum:
                      - faceRotation
                      - openMouth
                      - zoom
                      - blink
                      - passive
                      - motion
                      - yesOrNo
                randomizeActions:
                  type: boolean
                  description: >-
                    Whether to randomize the actions during the session.
                    Default: false.
                numberofActions:
                  type: number
                  description: 'Number of actions to perform in the session. Default: 1.'
                actionsDuration:
                  type: object
                  description: Per-action duration in seconds.
                  properties:
                    faceRotation:
                      type: number
                    openMouth:
                      type: number
                    zoom:
                      type: number
                    blink:
                      type: number
                    yesOrNo:
                      type: number
                    motion:
                      type: number
                    passive:
                      type: number
            example:
              threshold: mid
              actions:
                - faceRotation
                - openMouth
                - blink
              randomizeActions: true
              numberofActions: 3
              actionsDuration:
                faceRotation: 5
                openMouth: 3
                blink: 2
      responses:
        '200':
          description: Success
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: liveness settings updated successfully!
                data:
                  threshold: high
                  actions:
                    - faceRotation
                    - openMouth
                    - blink
                  randomizeActions: true
                  numberofActions: 3
                  actionsDuration:
                    faceRotation: 5
                    openMouth: 3
                    zoom: 0
                    blink: 2
                  businessId: 62b2e8b281442b03187f7896
                  createdAt: '2024-09-09T08:24:35.285Z'
                  lastModifiedAt: '2024-09-09T13:08:26.490Z'
                  id: 66deb0c395f3cd56ddfe6a17
                links: []
        '401':
          $ref: '#/components/responses/Error401Unauthorized'
        '402':
          $ref: '#/components/responses/Error402PaymentRequired'
        '404':
          description: Not Found — the resource you attempted to fetch does not exist.
          content:
            application/json:
              example:
                success: false
                statusCode: 404
                message: You have attempted to get a resource that does not exist.
                name: ResourceNotFoundError
                data: {}
        '429':
          $ref: '#/components/responses/Error429TooManyRequests'
        '500':
          $ref: '#/components/responses/Error500ServerError'
components:
  responses:
    Error401Unauthorized:
      description: Unauthorized — the token header is missing or invalid.
      content:
        application/json:
          example:
            success: false
            statusCode: 401
            message: Permission denied
            name: UnauthorizedError
            data: {}
    Error402PaymentRequired:
      description: Payment Required — your account balance is too low to run this check.
      content:
        application/json:
          example:
            success: false
            statusCode: 402
            message: Insufficient fund
            name: PaymentRequiredError
            data: {}
    Error429TooManyRequests:
      description: Too Many Requests — you have exceeded the rate limit; wait and retry.
      content:
        application/json:
          example:
            success: false
            statusCode: 429
            message: Too many requests
            name: RateLimitError
            data: {}
    Error500ServerError:
      description: >-
        Internal Server Error — a rare, unexpected failure on Youverify's side.
        Contact support@youverify.co if it persists.
      content:
        application/json:
          example:
            success: false
            statusCode: 500
            message: Internal Server Error
            name: Error
            data: {}
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: token
      description: Your Youverify API secret key. Never expose client-side.

````