Skip to main content

How to Verify Phone Numbers behind an IVR

Some phone numbers sit behind an IVR (interactive voice response) system and require dialing an extension to reach the right person. Telnyx now supports verifying numbers behind an IVR automatically through the API and the Mission Control Portal.

Telnyx Engineering avatar
Written by Telnyx Engineering
Updated over 2 weeks ago

Background

Standard Behavior

  1. Verification call is initiated.

  2. Telnyx calls the target phone number.

  3. Call is answered.

  4. Verification code is played.

  5. User enters the code to complete verification.

New Behavior (with IVR Extensions)

  1. Verification call is initiated, including IVR navigation digits.

  2. Telnyx calls the target phone number.

  3. Call is answered by the IVR.

  4. Telnyx waits, then dials the extension.

  5. Extension answers the call.

  6. Verification code is played.

  7. User enters the code to complete verification.


Pre-requisites

Before you begin, make sure you have:

  • A valid Telnyx API key (you can generate one in the Mission Control Portal).

  • The phone number you want to verify, in E.164 format (e.g., +15741156782).

Step 1: Prepare Your API Key

You’ll need to include your Telnyx API key in the Authorization header of your request:

Authorization: Bearer KEYXXXXXXXXXXXXXX

Step 2: Understand the Parameters

  • phone_number: Destination number in E.164 format.

  • verification_method: The method of verification. (Currently call is supported.)

  • extension: The DTMF sequence to navigate the IVR.

    • w = wait 0.5 seconds

    • W = wait 1 second

    • Digits 0–9 and letters A–D

    • Example: www2wW4w53ww3


Step 3: Make the API Request

Use the Create Verified Number endpoint.

Curl example:

curl --location --request POST 'https://api.telnyx.com/v2/verified_numbers' \ --header 'phone_number: +15741156782' \ --header 'verification_method: call' \ --header 'extension: www2wW4w53ww3' \ --header 'Authorization: Bearer KEYXXXXXXXXXXXXXX'

Replace KEYXXXXXXXXXXXXXX with your actual API key.


Step 4: Check the Response

If successful, you’ll receive a JSON response:

{ "phone_number": "+15741156782", "verification_method": "call", "extension": "www2wW4w53ww3" }

If the request fails (e.g., number not in E.164 format), you’ll see an error object describing the issue.


Through the Mission Control Portal

Login to the Mission Control Portal and navigate to the Numbers>Manage Numbers Page from the left side menu. You can also use this direct link after login.

Switch to the Verified Numbers Tab.

Add details of your number and the extension following the format from step 2 above. Select "Call me with a code". You will receive a call, from which the verification code will be read for input to complete verification.


Tips for Success

  • Always format phone numbers in E.164 (e.g., +1 for US numbers).

  • Test your extension sequence manually with the IVR before automating.

  • Use w to add short waits when the IVR is slow to respond.

  • Keep your API key private—never share it publicly.


References

Did this answer your question?