---
updatedAt: 2026-01-30T12:21:29.000Z
agentTools:
  projectIndex: https://developers.kaleyra.io/llms.txt
---

# Retry OTP for Phone Number

POST Method

The Retry OTP for Phone Number API allows you to request a new One-Time Password (OTP) if you did not receive the initial code sent to your phone number. When triggered, the system generates a fresh OTP to verify your new WhatsApp Business Number and resend it to the same mobile number via the desired channel (SMS or Voice).

## Prerequisites

1. Know Your Customer (KYC) approval is mandatory. For more information on submission and approval, see [Completing the Know Your Customer](https://developers.kaleyra.io/docs/document-submission-and-approval) page.
2. For prepaid customers, the credit balance should be sufficient to purchase numbers, make and receive calls, and monthly subscription charges. For more information on balance details, see [Adding Credits](https://developers.kaleyra.io/docs/adding-credits) page.
3. You must have Proof of Business/Business Address and Proof of Identification (Individual/Company-Signatory) depending on the regulations of that particular region or country.
4. Before you get started, [Create an API Key](https://developers.kaleyra.io/docs/generating-an-api-key). To view the API Key and the SID, see[ View API Key and SID](https://developers.kaleyra.io/docs/view-api-key-and-sid).\
   A prerequisite for using Kaleyra WhatsApp APIs is to have an active WhatsApp plan on Kaleyra platform.
5. To set up a WhatsApp account on Kaleyra platform, see [Manual Signup](https://developers.kaleyra.io/docs/manual-signup)\
   and [Embedded Signup](https://developers.kaleyra.io/docs/embedded-signup).
6. An active WhatsApp for Business API plan that includes:
   * A WhatsApp verified and approved profile.
   * A WABA ID onboarded on Kaleyra WhatsApp API.

## Base URL

`https://<api_domain>/v2/<SID>`

## API Domain and Value

| api\_domain | Value             |
| :---------- | :---------------- |
| IN pod      | api.in.kaleyra.io |
| SG Pod      | api.ap.kaleyra.io |
| EU Pod      | api.eu.kaleyra.io |

## API Request to Retry OTP for Phone Number

To retry OTP for phone number, use the `https://<api_domain>/v2/<sid>/whatsapp/<waba_id>/number/retry_otp` endpoint with the following request method:

## Request Format

The following is the request format to retry OTP for phone number:

```curl
curl --location --request POST  'https://<api_domain>/v2/<SID>/whatsapp/<waba_id>/number/retry_otp' \
-H 'api-key: <api-key>' \
-H 'Content-Type: <content-type>' \
-d '{
    "id" : "<phone_number_id>",
    "phone_number" : "<phone_number_with_cc>",
    "type_verification" : "<type_verification>"
}'

```

## Sample Request Format

The following is the sample request format to retry OTP for phone number:

```curl
curl --location --request POST  'https://api.in.kaleyra.io/v2/HXAP16XXXXXX97IN/whatsapp/766XXXXXXXXXX/number/retry_otp' \
-H 'api-key: Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3' \
-H 'Content-Type: application/json' \
-d '{
    "id" : "678997654XXXXX",
    "phone_number" : "+9197654XXXXX",
    "type_verification" : "SMS"
}'

```

## URL Parameters and Headers

The following is the list of parameters and headers to send the outgoing message request:

| Parameter / Headers | Data Type | Description                                                                                                                                                                                         | Example                                     | Mandatory? |
| :------------------ | :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------ | :--------- |
| `sid`               | String    | Account SID (Security Identifier).                                                                                                                                                                  | HXAP16XXXXXX97IN                            | Yes        |
| `waba_id`           | String    | The waba\_id associated with the WhatsApp Business Account. For more information, see step 1 to step 3 of [Adding a new WABA ID](https://developers.kaleyra.io/docs/whatsapp-adding-a-new-waba-id). | 766XXXXXXXXXX                               | Yes        |
| `api-key`           | String    | API key generated from kaleyra.io account.                                                                                                                                                          | Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3           | Yes        |
| `Content-Type`      | String    | Indicates the format of the content the API will be processing.                                                                                                                                     | The only allowed value is application/json. | Yes        |

The following is the list of attributes to be used in the payload to retry OTP for phone number in JSON format:

| Parameter           | Data Type | Description                                                         | Example        | Mandatory? |
| :------------------ | :-------- | :------------------------------------------------------------------ | :------------- | :--------- |
| `id`                | Integer   | Phone Number ID received via Phone Number Addition API.             | 678997654XXXXX | Yes        |
| `phone_number`      | String    | Phone Number to be added along with country code.                   | +9197654XXXXX  | Yes        |
| `type_verification` | String    | OTP required via SMS or VOICE. The supported value is SMS or VOICE. | SMS            | Yes        |

## Sample Success Response

The following is the sample success response.

```json
{
    "code": "WA200",
    "message": "Request Processed Successfully",
    "data": true,
    "error": {}
}
```

## Sample Failure Response

The following are the failure responses:

```json
{
    "code": "RBC001",
    "message": "Incorrect SID or API key.",
    "data": [],
    "error": {
        "body": "Incorrect SID or API key.",
        "error": "record not found"
    }
}
```

```json
{
    "code": "WA401",
    "message": "Waba_id is not present or does not belong to the account.",
    "data": {},
    "error": {
        "waba_id": "Waba_id is not present or does not belong to the account."
    }
}
```

```json
{
    "code": "WA400",
    "message": "Refer to correct payload format",
    "data": {},
    "error": {
        "payload": "Incorrect payload format"
    }
}
```

<br />

```json
{
    "code": "WA400",
    "message": "key: 'cloudapinumberotpretryrequest.type_verification' error:field validation for 'type_verification' failed on the 'isvalidtypeverification' tag",
    "data": [],
    "error": {
        "type_verification": "key: 'cloudapinumberotpretryrequest.type_verification' error:field validation for 'type_verification' failed on the 'isvalidtypeverification' tag"
    }
}
```

```json
{
    "code": "WA400",
    "message": "invalid phone number",
    "data": [],
    "error": {
        "phone_number": "invalid phone number"
    }
}
```

```json
{
    "code": "WA500",
    "message": "wa phone number already approved",
    "data": [],
    "error": {
        "error": "wa phone number already approved"
    }
}
```

```json
{
    "code": "WA500",
    "message": "Please try again later",
    "data": {},
    "error": {
        "error": "Internal server error"
    }
}
```