# OTP Final

`POST https://api.agilitycredit.net/v3/precise-id/otp/{session_id}`

Docs page: https://apidocs.agilitycredit.com/api/precise-id-otp-final · Tag: Precise ID

The "OTP Initial" endpoint provides One-Time Passcode (OTP)  authentication for identity verification during account opening processes. This  service generates and validates SMS-based OTP codes to verify that the applicant  has access to the provided phone number. The workflow consists of two steps:  first, an OTP is generated and sent to the applicant's phone number, then the  applicant submits the received code for validation. This multi-factor authentication  approach enhances security by confirming phone number ownership and reducing the  risk of identity fraud during account creation.

Authentication: `Authorization: Bearer <api key>`.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `session_id` | path | yes | The session identifier returned from the corresponding initial request. |
| `Idempotency-Key` | header | yes | A unique, idempotent key. We recommend to use a guid |
| `Agc-Tenant-Id` | header | yes | The tenant ID provided by Agility Credit. |
| `Agc-User-Id` | header | yes | The requestor user ID. |
| `Agc-Applicant-Id` | header |  | If passed, will assign the report to that applicant. If not, will create a new applicant ID |

## Request body (`application/json`), required

Inquiry request payload

Variant 1: `PreciseIDOTPFinal`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `otp_code` | string | yes |  |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Inquiry processed successfully | one of: PreciseIDResponseOTPFinal |
| 400 | Bad Request | BadRequestResponse |
| 401 | Unauthorized | UnauthorizedResponse |
| 403 | Forbidden | UnauthorizedResponse |
| 429 | Too Many Requests | TooManyRequestsResponse |
| 500 | Internal Server Error | AgilityServerErrorResponse |
The 200 body is one of: `PreciseIDResponseOTPFinal`.

### Error bodies

400:

```json
{
  "status": "Bad Request - Invalid Parameters",
  "error": "Failed schema validation. Error: data.pull_type must be one of ['prequal', 'hard'], Path: ['data', 'pull_type'], Data: prequalification"
}
```

401:

```json
{
  "message": "Unauthorized"
}
```

403:

```json
{
  "message": "Unauthorized"
}
```

429:

```json
{
  "error": "Too Many Requests"
}
```

500:

```json
{
  "message": "Agility Server Error"
}
```
