> 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/daf/iniciar-validacion.md).

# Start validation

Start a DAF validation by sending the `fileKeys` of the assets previously [uploaded to storage](/docs.facephi-en/rest-api/midapi-v2/daf/subida-de-assets.md). DAF responds immediately with a `transactionId`. The result is obtained via [polling](/docs.facephi-en/rest-api/midapi-v2/daf/consultar-estado.md).

{% hint style="info" %}
The final diagnosis (`APPROVED` / `DECLINED`), the rejection reason (`rejectionReason`) and the individual verification signals (`diagnostics[]`) are detailed in the [result response](/docs.facephi-en/rest-api/midapi-v2/daf/respuesta-de-resultado.md), which includes the **complete catalog of reason codes** (general and granular).
{% endhint %}

### Endpoint

```
POST /v2/daf/validate
```

### Headers

| Name              | Type   | Required | Description                                                                                                             |
| ----------------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Authorization** | string | **Yes**  | Consumer token in format `Bearer <token>` (see [Authentication](/docs.facephi-en/rest-api/midapi-v2/autenticacion.md)). |
| **consumer-id**   | string | **Yes**  | Consumer identifier.                                                                                                    |
| **operation-id**  | string | **Yes**  | Business operation/session identifier.                                                                                  |

### Request body

**Content-Type:** `application/json`

Each asset is referenced by a fixed role key (`document_front`, `document_back`, `face`), along with its `type` storage and its `fileKey`:

#### Parameters

| Parameter                | Type   | Required | Description                            |
| ------------------------ | ------ | -------- | -------------------------------------- |
| `document_front`         | object | **Yes**  | Document front asset.                  |
| `document_front.type`    | string | **Yes**  | Must be `TOKEN_FRONT_DOCUMENT`.        |
| `document_front.fileKey` | string | **Yes**  | `fileKey` returned by `POST /storage`. |
| `document_back`          | object | No       | Document back asset.                   |
| `document_back.type`     | string | No       | Must be `TOKEN_BACK_DOCUMENT`.         |
| `document_back.fileKey`  | string | No       | `fileKey` returned by `POST /storage`. |
| `face`                   | object | No       | Holder selfie asset.                   |
| `face.type`              | string | No       | Must be `TOKEN_FACE_IMAGE`.            |
| `face.fileKey`           | string | No       | `fileKey` returned by `POST /storage`. |

#### Request example

```json
{
  "document_front": {
    "type": "TOKEN_FRONT_DOCUMENT",
    "fileKey": "consumerX/op-123"
  },
  "document_back": {
    "type": "TOKEN_BACK_DOCUMENT",
    "fileKey": "consumerX/op-123"
  },
  "face": {
    "type": "TOKEN_FACE_IMAGE",
    "fileKey": "consumerX/op-123"
  }
}
```

### Input validations

* `document_front` is required, with `type = TOKEN_FRONT_DOCUMENT` and a `fileKey` resolvable.
* If included `document_back` or `face`, its `type` must exactly match the expected one.
* `consumer-id` and `operation-id` cannot be empty.
* If the request is invalid (bad request), it is rejected with a `4xx` and the transaction is not created. Other failures when starting processing create the transaction with `status = ERROR`.

### Responses

#### `202` Accepted

#### Response parameters

| Parameter       | Type   | Description                                                            |
| --------------- | ------ | ---------------------------------------------------------------------- |
| `transactionId` | string | Unique identifier of the DAF transaction.                              |
| `status`        | string | `PROCESSED` (accepted successfully) or `ERROR` (could not be started). |
| `timestamp`     | string | Transaction creation timestamp in format **ISO 8601**.                 |

#### Response example

```json
{
  "transactionId": "1c7d...e9",
  "status": "PROCESSED",
  "timestamp": "2026-06-26T12:00:00.000Z"
}
```

#### `400` Bad Request

The request fails input validations (required asset missing, `type` mismatched, empty header). The transaction is not created.
