Skip to main content
POST
/
verifications
/
call
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

const createVerificationResponse = await client.verifications.triggerCall({
  phone_number: '+13035551234',
  verify_profile_id: '12ade33a-21c0-473b-b055-b3c836e1c292',
});

console.log(createVerificationResponse.data);
import os
from telnyx import Telnyx

client = Telnyx(
    api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
)
create_verification_response = client.verifications.trigger_call(
    phone_number="+13035551234",
    verify_profile_id="12ade33a-21c0-473b-b055-b3c836e1c292",
)
print(create_verification_response.data)
package main

import (
	"context"
	"fmt"

	"github.com/team-telnyx/telnyx-go"
	"github.com/team-telnyx/telnyx-go/option"
)

func main() {
	client := telnyx.NewClient(
		option.WithAPIKey("My API Key"),
	)
	createVerificationResponse, err := client.Verifications.TriggerCall(context.TODO(), telnyx.VerificationTriggerCallParams{
		PhoneNumber:     "+13035551234",
		VerifyProfileID: "12ade33a-21c0-473b-b055-b3c836e1c292",
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", createVerificationResponse.Data)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.verifications.CreateVerificationResponse;
import com.telnyx.sdk.models.verifications.VerificationTriggerCallParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        TelnyxClient client = TelnyxOkHttpClient.fromEnv();

        VerificationTriggerCallParams params = VerificationTriggerCallParams.builder()
            .phoneNumber("+13035551234")
            .verifyProfileId("12ade33a-21c0-473b-b055-b3c836e1c292")
            .build();
        CreateVerificationResponse createVerificationResponse = client.verifications().triggerCall(params);
    }
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

create_verification_response = telnyx.verifications.trigger_call(
  phone_number: "+13035551234",
  verify_profile_id: "12ade33a-21c0-473b-b055-b3c836e1c292"
)

puts(create_verification_response)
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');

try {
  $createVerificationResponse = $client->verifications->triggerCall(
    phoneNumber: '+13035551234',
    verifyProfileID: '12ade33a-21c0-473b-b055-b3c836e1c292',
    customCode: '43612',
    extension: '1www2WABCDw9',
    timeoutSecs: 300,
  );

  var_dump($createVerificationResponse);
} catch (APIException $e) {
  echo $e->getMessage();
}
telnyx verifications trigger-call \
  --api-key 'My API Key' \
  --phone-number +13035551234 \
  --verify-profile-id 12ade33a-21c0-473b-b055-b3c836e1c292
curl --request POST \
  --url https://api.telnyx.com/v2/verifications/call \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone_number": "+13035551234",
  "verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
  "custom_code": "43612",
  "timeout_secs": 300,
  "extension": "1www2WABCDw9"
}
'
{
  "data": {
    "id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "type": "call",
    "record_type": "verification",
    "phone_number": "+13035551234",
    "verify_profile_id": "12ade33a-21c0-473b-b055-b3c836e1c292",
    "timeout_secs": 300,
    "status": "pending",
    "created_at": "2020-09-14T17:03:32.965812",
    "updated_at": "2020-09-14T17:03:32.965812"
  }
}
{
  "errors": [
    {
      "code": "10015",
      "title": "Invalid sorting value",
      "detail": "The value provided for sorting is not valid. Check the value used and try again.",
      "source": {
        "pointer": "/sort",
        "parameter": "<string>"
      },
      "meta": {
        "url": "https://developers.telnyx.com/docs/overview/errors/10015"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The request body when creating a verification.

phone_number
string
required

+E164 formatted phone number.

Example:

"+13035551234"

verify_profile_id
string<uuid>
required

The identifier of the associated Verify profile.

Example:

"12ade33a-21c0-473b-b055-b3c836e1c292"

custom_code
string | null

Send a self-generated numeric code to the end-user

Example:

"43612"

timeout_secs
integer

The number of seconds the verification code is valid for.

Example:

300

extension
string | null

Optional extension to dial after call is answered using DTMF digits. Valid digits are 0-9, A-D, *, and #. Pauses can be added using w (0.5s) and W (1s).

Example:

"1www2WABCDw9"

Response

Expected verifications response to a valid request.

data
Verification · object
required