# Liveness

## livenessCheck

> This method submits a biometric sample for liveness check.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/liveness":{"post":{"description":"This method submits a biometric sample for liveness check.","tags":["liveness"],"operationId":"livenessCheck","summary":"livenessCheck","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivenessCheckRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LivenessCheckResponse"}}}}}}}},"components":{"schemas":{"LivenessCheckRequest":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LivenessCheckBiometric"}}},"LivenessCheckBiometric":{"type":"object","properties":{"source":{"description":"How the biometric data was obtained. The value must be `ORIGINAL`.","type":"string","enum":["ORIGINAL"]},"type":{"description":"Type of the biometric data. The value must be `FACE`.","type":"string","enum":["FACE"]},"format":{"description":"Format of the biometric data. `REQUIRED`.","type":"string","enum":["JPEG","JPEG2000","PNG","TIFF","GIF","BMP"]},"content":{"description":"Base64 encoded biometric data. `REQUIRED`.","type":"string"}}},"LivenessCheckResponse":{"type":"object","properties":{"tguid":{"description":"Global unique ID of the transaction.","type":"string"},"bonafideScore":{"description":"Bonafide score of the liveness verification. Ranges from 0 to 100 (0=attack, 100=genuine).","type":"integer","format":"int32"}}}}}}
```

## getLivenessResult

> This method returns the liveness check result using the TGUID.

```json
{"openapi":"3.0.1","info":{"title":"GBDS API","version":"4.7.0"},"servers":[{"url":"http://<ip>:8085/gbds/v2"}],"paths":{"/liveness/{tguid}":{"get":{"description":"This method returns the liveness check result using the TGUID.","tags":["liveness"],"operationId":"getLivenessResult","summary":"getLivenessResult","parameters":[{"name":"tguid","in":"path","required":true,"description":"Global unique ID of the transaction.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLivenessResultResponse"}}}}}}}},"components":{"schemas":{"GetLivenessResultResponse":{"type":"object","properties":{"tguid":{"description":"Global unique ID of the transaction.","type":"string"},"biometric":{"description":"Biometric data used for the liveness verification.","$ref":"#/components/schemas/LivenessCheckBiometric"},"bonafideScore":{"description":"Bonafide score of the liveness verification. Ranges from 0 to 100 (0=attack, 100=genuine).","type":"integer","format":"int32"}}},"LivenessCheckBiometric":{"type":"object","properties":{"source":{"description":"How the biometric data was obtained. The value must be `ORIGINAL`.","type":"string","enum":["ORIGINAL"]},"type":{"description":"Type of the biometric data. The value must be `FACE`.","type":"string","enum":["FACE"]},"format":{"description":"Format of the biometric data. `REQUIRED`.","type":"string","enum":["JPEG","JPEG2000","PNG","TIFF","GIF","BMP"]},"content":{"description":"Base64 encoded biometric data. `REQUIRED`.","type":"string"}}}}}}
```
