> For the complete documentation index, see [llms.txt](https://pruvly.gitbook.io/pruvly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pruvly.gitbook.io/pruvly/document-engine/document-check.md).

# Document Check

The **Document Check API** allows you to verify the authenticity of user-submitted documents in real time. This endpoint processes document images or data, runs validation checks, and returns a response indicating whether the document is valid, expired, or potentially fraudulent.

## Create a new user

<mark style="color:green;">`POST`</mark> {{BASE-URL}}/verification/external/document/check

**Headers**

| Name         | Value                       |
| ------------ | --------------------------- |
| Content-Type | `application/json`          |
| api-key      | \<api key from your portal> |

**Body**

| Name     | Type   | Description                               |
| -------- | ------ | ----------------------------------------- |
| country  | string | document country                          |
| id\_type | string | <p>government-id <br>or<br>generic-id</p> |
| image    | string | base64 image of document                  |

**Response**

{% tabs %}
{% tab title="200" %}

````json
```json
{
    "status": true,
    "message": "Document check was successful",
    "data": {
        "is_government_id":true,
        "first_name": "",
        "last_name": "",
        "gender": "",
        "name_of_document": "",
        "nationality": "",
        "is_expired": "",
        "signature": "",
        "dob": "",
        "address": "",
        "document_number": "",
        "type_of_document": "",
        "country": "",
        "age": "",
        "issuer": "",
        "place_issue": "",
        "date_issue": "",
        "expiration_date": "",
        "image": "",
        "image_bounds": {},
        "authenticity_check":{
            "is_authentic": true,
            "confidence": 99.1
        }
    }
}
```
````

{% endtab %}

{% tab title="400" %}

```json
{
  "status": false
  "message": "Could not verify document, please ensure its a valid document"
}
```

{% endtab %}
{% endtabs %}
