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 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 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. To view the API Key and the SID, see 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
    and 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_domainValue
IN podapi.in.kaleyra.io
SG Podapi.ap.kaleyra.io
EU Podapi.eu.kaleyra.io
NA podapi.na.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 --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 --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 / HeadersData TypeDescriptionExampleMandatory?
sidStringAccount SID (Security Identifier).HXAP16XXXXXX97INYes
waba_idStringThe waba_id associated with the WhatsApp Business Account. For more information, see step 1 to step 3 of Adding a new WABA ID.766XXXXXXXXXXYes
api-keyStringAPI key generated from kaleyra.io account.Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3Yes
Content-TypeStringIndicates 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:

ParameterData TypeDescriptionExampleMandatory?
idIntegerPhone Number ID received via Phone Number Addition API.678997654XXXXXYes
phone_numberStringPhone Number to be added along with country code.+9197654XXXXXYes
type_verificationStringOTP required via SMS or VOICE. The supported value is SMS or VOICE.SMSYes

Sample Success Response

The following is the sample success response.

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

Sample Failure Response

The following are the failure responses:

{
    "code": "RBC001",
    "message": "Incorrect SID or API key.",
    "data": [],
    "error": {
        "body": "Incorrect SID or API key.",
        "error": "record not found"
    }
}
{
    "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."
    }
}
{
    "code": "WA400",
    "message": "Refer to correct payload format",
    "data": {},
    "error": {
        "payload": "Incorrect payload format"
    }
}

{
    "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"
    }
}
{
    "code": "WA400",
    "message": "invalid phone number",
    "data": [],
    "error": {
        "phone_number": "invalid phone number"
    }
}
{
    "code": "WA500",
    "message": "wa phone number already approved",
    "data": [],
    "error": {
        "error": "wa phone number already approved"
    }
}
{
    "code": "WA500",
    "message": "Please try again later",
    "data": {},
    "error": {
        "error": "Internal server error"
    }
}




© 2026 Kaleyra Inc. All rights reserved.
Trademarks, logos and service marks displayed on this site are registered and unregistered trademarks of Kaleyra Inc.