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

# Introduction

> Add document-based identity verification to account recovery and support-led flows.

<img src="https://mintcdn.com/ownid/p7erk2CAwk5sxChv/images/iddoc/flow.png?fit=max&auto=format&n=p7erk2CAwk5sxChv&q=85&s=cc56244a428c11bca488474a2af38b1f" alt="Identity document verification flow" width="945" height="211" data-path="images/iddoc/flow.png" />

Identity document verification lets you add a high-assurance recovery step when a user cannot complete their usual authentication path. OwnID hosts the user experience, collects the document verification result, and calls your backend so you can decide whether the recovered account should be restored, escalated, or denied.

At a high level, this simple integration consists of **just two steps:**

1. [**Implement `/verifyIdDoc` on your backend**](/building-blocks/identity-document-verification-backend) so OwnID can ask your backend to evaluate the verification result against the user account being recovered.
2. [**Start the verification from your frontend**](/building-blocks/identity-document-verification-frontend) using the OwnID Web SDK and use the challenge status to decide the next account-recovery action.

## Flow Overview

```mermaid actions={true} theme={null}
sequenceDiagram
    autonumber
    actor User
    participant App as Your app
    participant OwnID as OwnID
    participant Backend as Your backend

    User->>App: Request account recovery
    note over User,OwnID: User completes email or phone verification
    App->>OwnID: Start identity document challenge
    OwnID-->>App: Challenge started with completion URL
    App-->>User: Redirect user the hosted challenge URL
    User->>OwnID: Completes hosted document verification
    OwnID->>Backend: POST /verifyIdDoc
    Backend-->>OwnID: allow, deny, or review
    OwnID-->>User: Completed
    User->>App: Continue with account recovery
    App->>OwnID: Challenge status
    OwnID-->>App: Success
    App->>OwnID: Recover Account
    OwnID->>Backend: POST /getSessionByLoginId
    Backend-->>OwnID: Session
    OwnID-->>App: Session restored
    App-->>User: Restored access
```

## Prerequisites

Before you build this flow:

* Identity document verification capability is enabled — contact [support@ownid.com](mailto:support@ownid.com).
* Your OwnID application ID and shared secret from the [OwnID Console](https://console.ownid.com/).
* A defined policy for matching a verified document to an account (name, date of birth, etc.).
