# API Details

## Send OTP

<mark style="color:green;">`POST`</mark> `/common/sendOtp`

Use this endpoint to request for an OTP to be delivered to either mobile or email.&#x20;

<table data-full-width="false"><thead><tr><th width="187.7999267578125">Parameters</th><th width="83">Type</th><th width="333.400146484375">Description</th><th>Required?</th></tr></thead><tbody><tr><td><code>businessId</code></td><td>string</td><td>Operation ID (txId, Onboarding Request ID, etc)</td><td>TRUE</td></tr><tr><td><code>otpType</code></td><td>string</td><td><p>SMS</p><p>EMAIL</p></td><td>TRUE</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="00000" %}

```json
{
  "code": "00000",
  "msg": "Completed successfully"
}
```

{% endtab %}
{% endtabs %}

## Confirm OTP

<mark style="color:green;">`POST`</mark> `/common/confirmOperation`

\<This endpoint allows end users to confirm the OTP code that they received from mobile or email>

**Parameters**

<table data-full-width="false"><thead><tr><th width="219">Parameters</th><th width="83">Type</th><th width="307">Description</th><th>Is Required</th></tr></thead><tbody><tr><td><code>businessId</code></td><td>string</td><td>Operation ID (txId, Onboarding Request ID, etc)</td><td>TRUE</td></tr><tr><td><code>otpCode</code></td><td>string</td><td>The received OTP code</td><td>TRUE</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="00000" %}

```json
{
  "code": "00000",
  "msg": "Completed successfully"
}
```

{% endtab %}
{% endtabs %}

## Universal Resend OTP

Use this to request that an OTP be re-sent if the first request attempt fails to deliver. It applies for onboarding, account and transaction operations.&#x20;

<mark style="color:green;">`POST`</mark> `/common/resendOtp`

<table><thead><tr><th width="129.7999267578125">Fields</th><th width="118.800048828125">Type</th><th width="336">Description</th><th>Required?</th></tr></thead><tbody><tr><td><code>businessId</code></td><td>String</td><td>Operation ID (txId, Onboarding Request ID, etc)</td><td>Mandatory</td></tr><tr><td><code>otpType</code></td><td>String</td><td>SMS or EMAIL</td><td>Mandatory<br></td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="00000" %}

```json
{
  "code": "00000",
  "msg": "Completed successfully"
}
```

{% endtab %}
{% endtabs %}

## Send OTP - SME Account Administrator

<mark style="color:green;">`POST`</mark> `/common/sendAccAdminOtp`

This endpoint allows SME account administrators to send/resend an OTP to their mobile number or email address.

<table data-full-width="false"><thead><tr><th width="193.40008544921875">Parameters</th><th width="83">Type</th><th width="307">Description</th><th>Required?</th></tr></thead><tbody><tr><td><code>businessId</code></td><td>string</td><td>Unique Choice-generated string to identify the request</td><td>TRUE</td></tr><tr><td><code>otpType</code></td><td>string</td><td><p>SMS</p><p>EMAIL</p></td><td>TRUE</td></tr><tr><td><code>accountId</code></td><td>string</td><td>Account that is make the transfer</td><td>TRUE</td></tr><tr><td><code>accManagerIdNumber</code></td><td>string</td><td>Account admin's ID number</td><td>TRUE</td></tr><tr><td><code>idType</code></td><td>string</td><td><p>101 - (Kenya) National ID</p><p>102 - (Kenya) Alien ID</p><p>103 - Passport</p></td><td>TRUE</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="00000" %}

```json
{
  "code": "00000",
  "msg": "Completed successfully"
}
```

{% endtab %}
{% endtabs %}

## Group Applications

<mark style="color:green;">`POST`</mark> `/common/groupApplications`

Use this endpoint allows to group a batch of single transaction requests so that they can be approved them in one API call.

**Parameters**

<table data-full-width="false"><thead><tr><th width="219">Parameters</th><th width="83">Type</th><th width="307">Description</th><th>Required?</th></tr></thead><tbody><tr><td><code>applicationIdList</code></td><td>array</td><td>Array of string</td><td>TRUE</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="00000" %}

```json
{
  "applicationId": ""//The new application Id that can be used to confirm OTP
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://choice-bank.gitbook.io/choice-bank/otp/api-details.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
