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

# Face Liveness Check

> Verify that a submitted facial image belongs to a live person, not a photograph or pre-recorded video.

The Face Liveness Check endpoint analyzes a facial image to confirm physical presence. It returns a confidence score and a verification status to help you distinguish real users from spoofing attempts.

## Endpoint

```
POST /api/onboarding/biometrics/face/liveliness_check/
```

## Request

### Headers

| Header           | Value               | Required |
| ---------------- | ------------------- | -------- |
| `x-access-token` | Your API secret key | Yes      |
| `Content-Type`   | `application/json`  | Yes      |

### Body Parameters

| Parameter | Type   | Required | Description                                   |
| --------- | ------ | -------- | --------------------------------------------- |
| `image`   | string | Yes      | URL of the facial image to check for liveness |

### Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://adhere-api.smartcomply.com/api/onboarding/biometrics/face/liveliness_check/" \
    -H "x-access-token: YOUR_SECRET_KEY" \
    -H "Content-Type: application/json" \
    -d '{"image": "https://example.com/photo.jpg"}'
  ```
</CodeGroup>

## Response

### 200 OK

| Field                           | Type    | Description                                    |
| ------------------------------- | ------- | ---------------------------------------------- |
| `data.status`                   | boolean | `true` if liveness detected, `false` otherwise |
| `data.detail`                   | string  | Human-readable liveness result                 |
| `data.response_code`            | string  | `"00"` indicates success                       |
| `data.confidence`               | number  | Raw confidence score (0–1)                     |
| `data.confidence_in_percentage` | number  | Confidence as a percentage                     |
| `data.verification.status`      | string  | `"VERIFIED"` or `"FAILED"`                     |
| `data.verification.reference`   | string  | Unique reference for this check                |

```json theme={null}
{
  "status": "success",
  "data": {
    "status": true,
    "detail": "Liveliness Detected",
    "response_code": "00",
    "confidence": 0.9999987030029297,
    "confidence_in_percentage": 99.99987030029297,
    "verification": {
      "status": "VERIFIED",
      "reference": "067cbed9-acda-4d30-97c2-7f8e0c2ad687"
    },
    "widget_info": {},
    "session": {}
  },
  "message": "Face Liveliness successful"
}
```

### 400 Bad Request

```json theme={null}
{
  "status": "failed",
  "data": [],
  "message": "Missing required fields"
}
```

### 401 Unauthorized

```json theme={null}
{
  "status": "failed",
  "message": "Authentication credentials were not provided."
}
```


## OpenAPI

````yaml POST /api/onboarding/biometrics/face/liveliness_check/
openapi: 3.0.3
info:
  title: Adhere API
  description: >-
    Identity verification, credit checks, transaction monitoring, and loan fraud
    detection across Africa.
  version: 3.0.0
servers:
  - url: https://adhere-api.smartcomply.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Nigeria KYC
  - name: Kenya KYC
  - name: Ghana KYC
  - name: Rwanda KYC
  - name: Uganda KYC
  - name: Biometrics
  - name: Individual Credit
  - name: Business Credit
  - name: Transaction Monitoring
  - name: Transaction Screening
  - name: Transaction KYC
  - name: Loan Fraud
  - name: User Journey
paths:
  /api/onboarding/biometrics/face/liveliness_check/:
    post:
      tags:
        - Biometrics
      summary: Face Liveness Check
      operationId: faceLiveness
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - image
              properties:
                image:
                  type: string
                  description: URL of the image to check for liveness
      responses:
        '200':
          description: Liveness check successful
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: failed
              data:
                type: array
                items: {}
              message:
                type: string
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: failed
              message:
                type: string
                example: Authentication credentials were not provided.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-access-token
      description: Your Adhere API secret key

````