> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/rest-api/identity-api/identity-api-reference/onboarding/morphology.md).

# Morphology

Morphological services validate the physical authenticity of identity documents by analyzing their visual structure. They make it possible to detect falsified, altered, or poor-quality documents before processing the data they contain.

#### When to use it

Use it as a validation step before or after scanning Document in Onboarding flows where the document's quality and authenticity are critical.

#### Available services

| Service                 | Description                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Document validation     | <p>Standard asynchronous Flow for generic documents. The process is completed in three mandatory stages:</p><p><br></p><p>1. <code>POST /start</code>: Initialization of the process and image upload.</p><p><br></p><p>2. <code>POST /status</code>: Querying the current validation status.</p><p><br></p><p>3. <code>POST /data</code>: Retrieval of the final result and extracted data.</p> |
| Document validation V2  | Optimized Version of the asynchronous Flow. It keeps the three-step structure (`POST`), but redefines the response of the Endpoint `/data`. This version offers a cleaner data structure and, above all, much clearer and more specific rejection reasons, allowing better exception handling.                                                                                                   |
| Document PAD Diagnostic | Presentation Attack Detection on document images. It detects whether someone is trying to validate a screen, a photocopy, or any type of non-original reproduction.                                                                                                                                                                                                                              |

#### Response time note

Morphological validation is a semi-automated process. The average time is 60 seconds and can reach up to 270 seconds. Design your Integration with polling or webhooks; do not block the main thread while waiting for the response.
