---
title: "Update device stats"
url: "https://developer.incode.com/api-reference/device-stats/"
section: "api-reference"
group: "Onboarding"
version: "v1.1"
status: "live"
endpoint: "POST /omni/device/stats"
---
# Update device stats

`POST /omni/device/stats`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Sends information about collected capture frame statistics

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes |  |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `inspectorOpened` | boolean |  | Flag indicating web browser inspector detected |
| `frontIdStatsAnalysisStatus` | string |  | Status of the front ID capture analysis Enum: `PASS`, `UNCLEAR`, `FAIL` |
| `backIdStatsAnalysisStatus` | string |  | Status of the back ID capture analysis Enum: `PASS`, `UNCLEAR`, `FAIL` |
| `selfieStatsAnalysisStatus` | string |  | Status of the selfie ID capture analysis Enum: `PASS`, `UNCLEAR`, `FAIL` |
| `motionStatus` | string |  | Status of motion analysis Enum: `PASS`, `UNCLEAR`, `FAIL` |
| `virtualCameraDetected` | boolean |  | Flag indicating virtual camera was detected |
| `cameraLabelInspectionStatus` | string |  | Status of the camera label inspection Enum: `PASS`, `UNCLEAR`, `FAIL` |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean |  | Flag indicating request passed successfully. |
| `sessionStatus` | string |  | Session status Enum: `Alive`, `Closed`, `Deleted` |

### 400

Bad Request

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `timestamp` | integer (int64) |  | UTC timestamp in milliseconds |
| `status` | integer (int32) |  | Custom error code or HTTP status code |
| `error` | string |  | HTTP status error |
| `message` | string |  | Custom error message |
| `path` | string |  | Endpoint path |
| `details` | object |  | Custom error details |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/omni/device/stats \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "inspectorOpened": false,
    "frontIdStatsAnalysisStatus": "",
    "backIdStatsAnalysisStatus": "",
    "selfieStatsAnalysisStatus": "",
    "motionStatus": "",
    "virtualCameraDetected": false,
    "cameraLabelInspectionStatus": ""
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/omni/device/stats", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "inspectorOpened": false,
      "frontIdStatsAnalysisStatus": "",
      "backIdStatsAnalysisStatus": "",
      "selfieStatsAnalysisStatus": "",
      "motionStatus": "",
      "virtualCameraDetected": false,
      "cameraLabelInspectionStatus": ""
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/omni/device/stats", headers=headers, json={
  "inspectorOpened": False,
  "frontIdStatsAnalysisStatus": "",
  "backIdStatsAnalysisStatus": "",
  "selfieStatsAnalysisStatus": "",
  "motionStatus": "",
  "virtualCameraDetected": False,
  "cameraLabelInspectionStatus": ""
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/omni/device/stats"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inspectorOpened\": false,\n  \"frontIdStatsAnalysisStatus\": \"\",\n  \"backIdStatsAnalysisStatus\": \"\",\n  \"selfieStatsAnalysisStatus\": \"\",\n  \"motionStatus\": \"\",\n  \"virtualCameraDetected\": false,\n  \"cameraLabelInspectionStatus\": \"\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

```json
{
  "success": true,
  "status": "OK"
}
```
