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.

Telnyx Engineering avatar
Written by Telnyx Engineering
Updated this week

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.

Note: Currently this feature is only available through the API. It will be deployed to the Telnyx Mission Control Portal soon under the Verified Numbers page. Keep an eye on our release notes.


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.


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?