Send an email-ownership verification code
Email a 6-digit code to the DIR’s authorizer email to confirm ownership of that address. The code goes to the authorizer, not to the caller. If the authorizer is someone else (for example a client’s executive), that person has to share the code with whoever is completing setup.
How long the code lasts: 15 minutes by default. 8 hours when the DIR has a call center (BPO) linked through bpo_authorizations whose authorization is pending review or approved (a rejected authorization does not count). Link the call center before you send the code: a code sent before the link keeps the 15-minute window, and a code sent after the link lasts 8 hours. The email states the window, and expires_at in the response always shows the exact expiry.
To resend, call this endpoint again. Each send issues a fresh code and invalidates the previous one. Sends are limited to one every 60 seconds and 10 per DIR per UTC day. A throttled send returns 429 with retry_after_secs and sends_remaining_today in the error meta.
Submit the code to POST /dir/{dir_id}/verify_email/confirm.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const EmailVerificationStatusWrapped = await client.dir.verifyEmail.create('dir_id');
console.log(EmailVerificationStatusWrapped.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
)
email_verification_status_wrapped = client.dir.verify_email.create(
"dir_id",
)
print(email_verification_status_wrapped.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"),
)
verifyEmail, err := client.Dir.VerifyEmail.New(
context.TODO(),
"dir_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifyEmail.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.dir().verifyEmail().create("dir_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_verification_status_wrapped = telnyx.dir.verify_email.create("dir_id")
puts(email_verification_status_wrapped)<?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 {
$email_verification_status_wrapped = $client->dir->verifyEmail->create(
'dir_id',
);
var_dump($email_verification_status_wrapped);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:verify-email create \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011curl --request POST \
--url https://api.telnyx.com/v2/dir/{dir_id}/verify_email \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "email_verification",
"email_verified": false,
"status": "sent",
"expires_at": "2026-07-30T17:15:00Z",
"sends_remaining_today": 9
}
}Authorizations
Telnyx API key. Generate one at https://portal.telnyx.com/#/app/api-keys.
Path Parameters
The DIR id. Lowercase UUID.
"16635d38-75a6-4481-82e8-69af60e05011"
Response
A code was emailed; the current verification state is returned.
Verification state for a DIR's authorizer email.
Show child attributes
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const EmailVerificationStatusWrapped = await client.dir.verifyEmail.create('dir_id');
console.log(EmailVerificationStatusWrapped.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
)
email_verification_status_wrapped = client.dir.verify_email.create(
"dir_id",
)
print(email_verification_status_wrapped.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"),
)
verifyEmail, err := client.Dir.VerifyEmail.New(
context.TODO(),
"dir_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifyEmail.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.dir().verifyEmail().create("dir_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_verification_status_wrapped = telnyx.dir.verify_email.create("dir_id")
puts(email_verification_status_wrapped)<?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 {
$email_verification_status_wrapped = $client->dir->verifyEmail->create(
'dir_id',
);
var_dump($email_verification_status_wrapped);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:verify-email create \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011curl --request POST \
--url https://api.telnyx.com/v2/dir/{dir_id}/verify_email \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "email_verification",
"email_verified": false,
"status": "sent",
"expires_at": "2026-07-30T17:15:00Z",
"sends_remaining_today": 9
}
}