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

# Document Analysis API: ID Verification and Data Extraction

> Submit front and back images of an ID (passport, driver's licence, national ID, residence permit). Get extracted fields, authenticity signals, and support for 11,000+ document types across 200 countries.

```http [POST] theme={null}
{{baseUrl}}/api/v1/document/analysis
```

<Note>
  This endpoint accepts **image file types only** (e.g. JPEG, PNG). PDF files are **not** supported.
</Note>

### Header

| Header        | Type   | Description                                                                                         |
| ------------- | ------ | --------------------------------------------------------------------------------------------------- |
| AppId         | string | Create an app to get your app ID on dashboard [here](https://app.dojah.io/developers/configuration) |
| Authorization | string | Private/secret key. Use `<key>` not `Bearer <key>`                                                  |

### Body parameter

| Parameter      | Type   | Description                                                                                                                                                                          | Required |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| input\_type    | string | `url` or `base64` of an image, defaults to `url`                                                                                                                                     | required |
| imagefrontside | string | Base64 or URL of the document(Drivers License, International Passport, National IDs, Resident Permits etc) NB: Kindly truncate **data:image/jpeg;base64,** from the image if base64. | required |
| imagebackside  | string | Base64 or URL of the document(This is Optional) NB: Kindly truncate **data:image/jpeg;base64,** from the image if base64.                                                            | optional |
| images         | string | Base64 or URL of the document(This is Optional) NB: Kindly truncate **data:image/jpeg;base64,** from the image if base64.                                                            | optional |

### Response parameter

| Parameter        | Type    | Description                                                                                                   |
| ---------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| overall\_status  | integer | 1 means VALID, 0 means INVALID                                                                                |
| reason           | string  | values are VALID or INVALID                                                                                   |
| document\_type   | string  | No means the document doesn’t have a type, Yes means the document have a type, e.g PASSPORT, DRIVER'S LICENCE |
| document\_images | string  | No means the document doesn’t have holder's image, Yes means the document have holder's image                 |
| text             | string  | No means the document doesn’t have readable text, Yes means the document have readable text                   |
| expiry           | string  | No means the document doesn’t have expiry date, Yes means the document have expiry date.                      |

### Response

```json Response theme={null}
{
    "entity": {
        "status": {
            "overall_status": 0,
            "reason": "NOT_VALID",
            "document_images": "Yes",
            "text": "Yes",
            "document_type": "Yes",
            "expiry": "No"
        },
        "document_type": {
            "document_name": "United States - Permanent Resident Card (2010)",
            "document_country_name": "United States",
            "document_country_code": "USA"
        },
        "document_images": {
            "portrait": "/9j/4AAQSkZJRgABAQEAxwDHAAD2Q....==",
            "document_front_side": "/9j/4AAQSkZJRgABAQEAxwDHAAD...==",
            "document_back_side": "/9j/4AAQSkZJRgABAQEAxwDHAAD...2Q=="
        },
        "text_data": [
           			{
                    "field_name": "Document Number",
                    "field_key" : "document_number",
                    "status": 1,
                    "value": "12345678"
                },
                {
                    "field_name": "Sex",
                    "field_key" : "sex",
                    "status": 1,
                    "value": "M"
                },
                {
                    "field_name": "Date of Birth",
                    "field_key" : "dob",
                    "status": 1,
                    "value": "1990-08-01"
                },
                {
                    "field_name": "Age",
                    "field_key": "age",
                    "status": 2,
                    "value": "-1"
                },
                {
                    "field_name": "Date of Expiry",
                    "field_key" : "expiry_date",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "Date of Issue",
                    "field_key" : "issue_date",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "Given Names",
                    "field_key" : "given_names",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "Last Name",
                    "field_key" : "last_name",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "First Name",
                    "field_key" : "first_name",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "Address",
                    "field_key" : "address",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "Place of Birth",
                    "field_key" : "place_of_birth",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "Nationality",
                    "field_key" : "nationality",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "Issuing State Code",
                    "field_key" : "issuing_state_code",
                    "status": 0,
                    "value": ""
                },
                {
                    "field_name": "Issuing State Name",
                    "field_key" : "issuing_state_name",
                    "status": 0,
                    "value": ""
                }
        ]
    }
}
```

### Response Fields

| Field                                         | Type    | Description                                                                                   |
| --------------------------------------------- | ------- | --------------------------------------------------------------------------------------------- |
| entity                                        | object  | Contains the response data                                                                    |
| entity.status                                 | object  | Document validation status summary                                                            |
| entity.status.overall\_status                 | integer | Overall validity: `1` means VALID, `0` means INVALID                                          |
| entity.status.reason                          | string  | Reason for the validation result (e.g., `VALID`, `NOT_VALID`)                                 |
| entity.status.document\_images                | string  | Whether the document contains a holder's image (`Yes` or `No`)                                |
| entity.status.text                            | string  | Whether the document contains readable text (`Yes` or `No`)                                   |
| entity.status.document\_type                  | string  | Whether the document type was identified (`Yes` or `No`)                                      |
| entity.status.expiry                          | string  | Whether the document contains an expiry date (`Yes` or `No`)                                  |
| entity.document\_type                         | object  | Identified document type details                                                              |
| entity.document\_type.document\_name          | string  | Full name of the identified document (e.g., `United States - Permanent Resident Card (2010)`) |
| entity.document\_type.document\_country\_name | string  | Country that issued the document                                                              |
| entity.document\_type.document\_country\_code | string  | ISO country code of the issuing country                                                       |
| entity.document\_images                       | object  | Extracted images from the document                                                            |
| entity.document\_images.portrait              | string  | Base64-encoded portrait/photo extracted from the document                                     |
| entity.document\_images.document\_front\_side | string  | Base64-encoded image of the front side of the document                                        |
| entity.document\_images.document\_back\_side  | string  | Base64-encoded image of the back side of the document                                         |
| entity.text\_data                             | array   | List of extracted text fields from the document                                               |
| entity.text\_data\[].field\_name              | string  | Human-readable name of the extracted field (e.g., `Document Number`, `Date of Birth`)         |
| entity.text\_data\[].field\_key               | string  | Machine-readable key for the field (e.g., `document_number`, `date_of_birth`)                 |
| entity.text\_data\[].status                   | integer | Extraction status: `1` = successfully extracted, `0` = not found, `2` = extraction uncertain  |
| entity.text\_data\[].value                    | string  | Extracted value for the field, empty string if not found                                      |

## Utility Bill

```http [POST] theme={null}
{{baseUrl}}/api/v1/document/analysis/utility_bill
```

<Note>
  This endpoint accepts **image file types only** (e.g. JPEG, PNG). PDF files are **not** supported.
</Note>

### Header

| Header        | Type   | Description                                                                                         |
| ------------- | ------ | --------------------------------------------------------------------------------------------------- |
| AppId         | string | Create an app to get your app ID on dashboard [here](https://app.dojah.io/developers/configuration) |
| Authorization | string | Private/secret key. Use `<key>` not `Bearer <key>`                                                  |

### Body parameter

| Parameter    | Type   | Description                   | Required |
| ------------ | ------ | ----------------------------- | -------- |
| input\_type  | string | `url`, defaults to `url`      | required |
| input\_value | string | Image URL of the Utility Bill | required |

### Response

```json Response theme={null}
{
    "entity": {
        "result": {
            "status": "success",
            "message": ""
        },
        "identity_info": {
            "full_name": "JOHN DOE MUSA",
            "meter_number": "SBX12345678"
        },
        "address_info": {
            "street": "123 Sandbox Street SBX001",
            "city": "Testville",
            "state": "SB",
            "country": "Sandbox Country"
        },
        "provider_name": "Sandbox Power Company",
        "bill_issue_date": "2025-01-15",
        "amount_paid": "100",
        "metadata": {
            "extraction_date": "2025-08-15T00:00:00.000Z",
            "is_recent": true
        }
    }
}
```

### Response Fields

| Field                               | Type    | Description                                                |
| ----------------------------------- | ------- | ---------------------------------------------------------- |
| entity                              | object  | Contains the response data                                 |
| entity.result                       | object  | Operation result status                                    |
| entity.result.status                | string  | Processing status (e.g., `success`)                        |
| entity.result.message               | string  | Additional status message, empty on success                |
| entity.identity\_info               | object  | Identity information extracted from the utility bill       |
| entity.identity\_info.full\_name    | string  | Full name of the account holder                            |
| entity.identity\_info.meter\_number | string  | Meter or account number on the bill                        |
| entity.address\_info                | object  | Address information extracted from the utility bill        |
| entity.address\_info.street         | string  | Street address                                             |
| entity.address\_info.city           | string  | City name                                                  |
| entity.address\_info.state          | string  | State or province                                          |
| entity.address\_info.country        | string  | Country name                                               |
| entity.provider\_name               | string  | Name of the utility service provider                       |
| entity.bill\_issue\_date            | string  | Date the bill was issued (YYYY-MM-DD format)               |
| entity.amount\_paid                 | string  | Amount paid on the bill                                    |
| entity.metadata                     | object  | Additional extraction metadata                             |
| entity.metadata.extraction\_date    | string  | Timestamp of when the data was extracted (ISO 8601 format) |
| entity.metadata.is\_recent          | boolean | Whether the bill is considered recent                      |

## Business Document

```http [POST] theme={null}
{{baseUrl}}/api/v1/document/analysis/business_document

```

<Note>
  This endpoint accepts **image file types only** (e.g. JPEG, PNG). PDF files are **not** supported.
</Note>

### Header

| Header        | Type   | Description                                                                                         |
| ------------- | ------ | --------------------------------------------------------------------------------------------------- |
| AppId         | string | Create an app to get your app ID on dashboard [here](https://app.dojah.io/developers/configuration) |
| Authorization | string | Private/secret key. Use `<key>` not `Bearer <key>`                                                  |

### Body parameter

| Parameter    | Type   | Description                         | Required |
| ------------ | ------ | ----------------------------------- | -------- |
| input\_type  | string | `url`, defaults to `url`            | required |
| input\_value | string | Image URL of the Business document. | required |

### Response

```json Response theme={null}
{
    "entity": {
        "result": {
            "status": "success",
            "message": ""
        },
        "document_type": "Business Registration Certificate",
        "issuing_country": "Sandbox Country",
        "issuing_authority": "Sandbox State Business Authority",
        "registration_number": "SBX-0000",
        "business": {
            "legal_name": "Sandbox Demo Company Ltd.",
            "entity_type": "Incorporated",
            "nature_of_business": ["Software Development", "Testing Services"]
        },
        "principal_place_of_business": {
            "street": "123 Sandbox Street",
            "city": "Testville",
            "lga": "",
            "state": "SB",
            "country": "Sandbox Country"
        },
        "registration_date": "2025-01-01"
    }
}

```

### Response Fields

| Field                                         | Type   | Description                                                                      |
| --------------------------------------------- | ------ | -------------------------------------------------------------------------------- |
| entity                                        | object | Contains the response data                                                       |
| entity.result                                 | object | Operation result status                                                          |
| entity.result.status                          | string | Processing status (e.g., `success`)                                              |
| entity.result.message                         | string | Additional status message, empty on success                                      |
| entity.document\_type                         | string | Type of business document identified (e.g., `Business Registration Certificate`) |
| entity.issuing\_country                       | string | Country where the document was issued                                            |
| entity.issuing\_authority                     | string | Authority or body that issued the document                                       |
| entity.registration\_number                   | string | Business registration number extracted from the document                         |
| entity.business                               | object | Extracted business information                                                   |
| entity.business.legal\_name                   | string | Legal name of the registered business                                            |
| entity.business.entity\_type                  | string | Type of business entity (e.g., `Incorporated`, `LLC`)                            |
| entity.business.nature\_of\_business          | array  | List of business activity descriptions                                           |
| entity.principal\_place\_of\_business         | object | Registered business address                                                      |
| entity.principal\_place\_of\_business.street  | string | Street address                                                                   |
| entity.principal\_place\_of\_business.city    | string | City name                                                                        |
| entity.principal\_place\_of\_business.lga     | string | Local Government Area (may be empty)                                             |
| entity.principal\_place\_of\_business.state   | string | State or province                                                                |
| entity.principal\_place\_of\_business.country | string | Country name                                                                     |
| entity.registration\_date                     | string | Date the business was registered (YYYY-MM-DD format)                             |
