> 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 the synchronous Rest API of the Facephi API ecosystem. It exposes Identity Verification and anti-fraud services through authenticated REST endpoints with OAuth2, designed for integrators and backend developers.

### Concepts: client platform and consumer

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

* **Client platform**: represents the unique relationship between the client and Facephi. It is identified with the header `platform-id` and has an associated API Key. There is a single platform per client.
* **Consumer**: represents one of the client'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 client 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 makes it possible to manage permissions, limits, and traceability independently by channel, while maintaining a single platform per client.

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. The 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) | Anti-fraud validation of identity documents, with optional selfie and final diagnosis (`APPROVED`/`DECLINED`). |
