Create a Verify profile
Creates a new Verify profile to associate verifications with.
POST
/
verify_profiles
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const verifyProfileData = await client.verifyProfiles.create({ name: 'Test Profile' });
console.log(verifyProfileData.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
)
verify_profile_data = client.verify_profiles.create(
name="Test Profile",
)
print(verify_profile_data.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"),
)
verifyProfileData, err := client.VerifyProfiles.New(context.TODO(), telnyx.VerifyProfileNewParams{
Name: "Test Profile",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifyProfileData.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.verifyprofiles.VerifyProfileCreateParams;
import com.telnyx.sdk.models.verifyprofiles.VerifyProfileData;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VerifyProfileCreateParams params = VerifyProfileCreateParams.builder()
.name("Test Profile")
.build();
VerifyProfileData verifyProfileData = client.verifyProfiles().create(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
verify_profile_data = telnyx.verify_profiles.create(name: "Test Profile")
puts(verify_profile_data)<?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 {
$verifyProfileData = $client->verifyProfiles->create(
name: 'Test Profile',
call: [
'appName' => 'Example Secure App',
'codeLength' => 6,
'defaultVerificationTimeoutSecs' => 300,
'messagingTemplateID' => '0abb5b4f-459f-445a-bfcd-488998b7572d',
'whitelistedDestinations' => ['US', 'CA'],
],
dailySpendLimit: 100,
dailySpendLimitEnabled: true,
flashcall: [
'appName' => 'Example Secure App',
'defaultVerificationTimeoutSecs' => 300,
'whitelistedDestinations' => ['US', 'CA'],
],
language: 'en-US',
sms: [
'alphaSender' => 'sqF',
'appName' => 'Example Secure App',
'codeLength' => 6,
'defaultVerificationTimeoutSecs' => 300,
'messagingTemplateID' => '0abb5b4f-459f-445a-bfcd-488998b7572d',
'whitelistedDestinations' => ['US', 'CA'],
],
webhookFailoverURL: 'http://example.com/webhook/failover',
webhookURL: 'http://example.com/webhook',
whatsapp: [
'defaultVerificationTimeoutSecs' => 300,
'senderPhoneNumber' => '+13035551234',
'templateID' => 'authentication_template_name',
'wabaID' => '1234567890',
'whitelistedDestinations' => ['US', 'CA'],
],
);
var_dump($verifyProfileData);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx verify-profiles create \
--api-key 'My API Key' \
--name 'Test Profile'curl --request POST \
--url https://api.telnyx.com/v2/verify_profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Test Profile",
"language": "en-US",
"webhook_url": "http://example.com/webhook",
"webhook_failover_url": "http://example.com/webhook/failover",
"sms": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"alpha_sender": "Telnyx",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300
},
"call": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300
},
"flashcall": {
"whitelisted_destinations": [
"US",
"CA"
],
"app_name": "Example Secure App",
"default_verification_timeout_secs": 300
},
"whatsapp": {
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300,
"waba_id": "1234567890",
"sender_phone_number": "+13035551234",
"template_id": "authentication_template_id"
},
"daily_spend_limit_enabled": true,
"daily_spend_limit": 100
}
'{
"data": {
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"name": "Test Profile",
"webhook_url": "http://example.com/webhook",
"webhook_failover_url": "http://example.com/webhook/failover",
"daily_spend_limit_enabled": true,
"daily_spend_limit": 100,
"record_type": "verification_profile",
"created_at": "2020-09-14T17:03:32.965812",
"updated_at": "2020-09-14T17:03:32.965812",
"language": "en-US",
"sms": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"alpha_sender": "Telnyx",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300
},
"call": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300
},
"flashcall": {
"app_name": "Example Secure App",
"default_verification_timeout_secs": 300
},
"whatsapp": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300,
"waba_id": "1234567890",
"sender_phone_number": "+13035551234",
"template_id": "authentication_template_id"
}
}
}{
"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
Body
application/json
Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const verifyProfileData = await client.verifyProfiles.create({ name: 'Test Profile' });
console.log(verifyProfileData.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
)
verify_profile_data = client.verify_profiles.create(
name="Test Profile",
)
print(verify_profile_data.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"),
)
verifyProfileData, err := client.VerifyProfiles.New(context.TODO(), telnyx.VerifyProfileNewParams{
Name: "Test Profile",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifyProfileData.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.verifyprofiles.VerifyProfileCreateParams;
import com.telnyx.sdk.models.verifyprofiles.VerifyProfileData;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VerifyProfileCreateParams params = VerifyProfileCreateParams.builder()
.name("Test Profile")
.build();
VerifyProfileData verifyProfileData = client.verifyProfiles().create(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
verify_profile_data = telnyx.verify_profiles.create(name: "Test Profile")
puts(verify_profile_data)<?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 {
$verifyProfileData = $client->verifyProfiles->create(
name: 'Test Profile',
call: [
'appName' => 'Example Secure App',
'codeLength' => 6,
'defaultVerificationTimeoutSecs' => 300,
'messagingTemplateID' => '0abb5b4f-459f-445a-bfcd-488998b7572d',
'whitelistedDestinations' => ['US', 'CA'],
],
dailySpendLimit: 100,
dailySpendLimitEnabled: true,
flashcall: [
'appName' => 'Example Secure App',
'defaultVerificationTimeoutSecs' => 300,
'whitelistedDestinations' => ['US', 'CA'],
],
language: 'en-US',
sms: [
'alphaSender' => 'sqF',
'appName' => 'Example Secure App',
'codeLength' => 6,
'defaultVerificationTimeoutSecs' => 300,
'messagingTemplateID' => '0abb5b4f-459f-445a-bfcd-488998b7572d',
'whitelistedDestinations' => ['US', 'CA'],
],
webhookFailoverURL: 'http://example.com/webhook/failover',
webhookURL: 'http://example.com/webhook',
whatsapp: [
'defaultVerificationTimeoutSecs' => 300,
'senderPhoneNumber' => '+13035551234',
'templateID' => 'authentication_template_name',
'wabaID' => '1234567890',
'whitelistedDestinations' => ['US', 'CA'],
],
);
var_dump($verifyProfileData);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx verify-profiles create \
--api-key 'My API Key' \
--name 'Test Profile'curl --request POST \
--url https://api.telnyx.com/v2/verify_profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Test Profile",
"language": "en-US",
"webhook_url": "http://example.com/webhook",
"webhook_failover_url": "http://example.com/webhook/failover",
"sms": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"alpha_sender": "Telnyx",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300
},
"call": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300
},
"flashcall": {
"whitelisted_destinations": [
"US",
"CA"
],
"app_name": "Example Secure App",
"default_verification_timeout_secs": 300
},
"whatsapp": {
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300,
"waba_id": "1234567890",
"sender_phone_number": "+13035551234",
"template_id": "authentication_template_id"
},
"daily_spend_limit_enabled": true,
"daily_spend_limit": 100
}
'{
"data": {
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"name": "Test Profile",
"webhook_url": "http://example.com/webhook",
"webhook_failover_url": "http://example.com/webhook/failover",
"daily_spend_limit_enabled": true,
"daily_spend_limit": 100,
"record_type": "verification_profile",
"created_at": "2020-09-14T17:03:32.965812",
"updated_at": "2020-09-14T17:03:32.965812",
"language": "en-US",
"sms": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"alpha_sender": "Telnyx",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300
},
"call": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300
},
"flashcall": {
"app_name": "Example Secure App",
"default_verification_timeout_secs": 300
},
"whatsapp": {
"messaging_template_id": "0abb5b4f-459f-445a-bfcd-488998b7572d",
"app_name": "Example Secure App",
"code_length": 6,
"whitelisted_destinations": [
"US",
"CA"
],
"default_verification_timeout_secs": 300,
"waba_id": "1234567890",
"sender_phone_number": "+13035551234",
"template_id": "authentication_template_id"
}
}
}{
"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"
}
}
]
}