> 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/midapi-v2.md).

# MIDAPI v2

**MIDAPI v2** is Facephi's synchronous Rest API in the API ecosystem. It exposes Identity Verification and antifraud services through OAuth2-authenticated REST endpoints, designed for integrators and backend developers.

### Concepts: customer platform and consumer

Before integrating any MIDAPI v2 service, it is worth understanding the two concepts around which access is organized:

* **Customer platform**: represents the unique relationship between the customer and Facephi. It is identified with the header `platform-id` and has an associated API Key. There is a single platform per customer.
* **Consumer**: represents one of the customer's business channels or verticals (for example, the web channel and the mobile app, or verticals such as insurance and investments). It is identified with the header `consumer-id`. Each consumer has enabled only the services contracted for that channel, with independent usage limits and traceability.

As part of the service onboarding, the customer will be provided with the **base URL** of the API, the **platform credentials** and **at least one consumer** (one for each channel or vertical that needs to be integrated). All routes in this guide are relative to that base URL (for example, `POST <URL base>/consumer/token`). This model allows permissions, limits, and traceability to be managed independently by channel, while maintaining a single platform per customer.

With these two concepts, the access Token is obtained: the platform issues Tokens for its consumers, and each operational call is made on behalf of a consumer. Details are in [Authentication](/docs.facephi-en/rest-api/midapi-v2/autenticacion.md).

### Available services

| Service                                                                 | Description                                                                                               |
| ----------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| [DAF (Document Anti-Fraud)](/docs.facephi-en/rest-api/midapi-v2/daf.md) | Identity document antifraud validation, with optional selfie and final diagnosis (`APPROVED`/`DECLINED`). |
