Confirm an email-ownership verification code
Submit the 6-digit code that was emailed to the DIR’s authorizer email. On success the authorizer email is marked verified.
For security, any failure (wrong, expired, already-used, or too many attempts) returns the same generic message.
POST
/
dir
/
{dir_id}
/
verify_email
/
confirm
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const response = await client.dir.verifyEmail.confirm('dir_id', {
code: '482915',
});
console.log(response.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
)
response = client.dir.verify_email.confirm(
dir_id="dir_id",
code="482915",
)
print(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"),
)
response, err := client.Dir.VerifyEmail.Confirm(
context.TODO(),
"dir_id",
telnyx.DirVerifyEmailConfirmParams{
Code: "482915",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.dir.verifyEmail.VerifyEmailConfirmParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VerifyEmailConfirmParams params = VerifyEmailConfirmParams.builder()
.code("482915")
.build();
var response = client.dir().verifyEmail().confirm("dir_id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.dir.verify_email.confirm("dir_id", code: "482915")
puts(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 {
$response = $client->dir->verifyEmail->confirm(
'dir_id',
code: '482915',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:verify-email confirm \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011 \
--code 482915curl --request POST \
--url https://api.telnyx.com/v2/dir/{dir_id}/verify_email/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "482915"
}
'{
"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.
Example:
"16635d38-75a6-4481-82e8-69af60e05011"
Body
application/json
The 6-digit code sent to the authorizer email.
Required string length:
6Pattern:
^\d{6}$Example:
"482915"
Response
The authorizer email is verified.
Verification state for a DIR's authorizer email.
Show child attributes
Show child attributes
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 response = await client.dir.verifyEmail.confirm('dir_id', {
code: '482915',
});
console.log(response.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
)
response = client.dir.verify_email.confirm(
dir_id="dir_id",
code="482915",
)
print(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"),
)
response, err := client.Dir.VerifyEmail.Confirm(
context.TODO(),
"dir_id",
telnyx.DirVerifyEmailConfirmParams{
Code: "482915",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.dir.verifyEmail.VerifyEmailConfirmParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VerifyEmailConfirmParams params = VerifyEmailConfirmParams.builder()
.code("482915")
.build();
var response = client.dir().verifyEmail().confirm("dir_id", params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.dir.verify_email.confirm("dir_id", code: "482915")
puts(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 {
$response = $client->dir->verifyEmail->confirm(
'dir_id',
code: '482915',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx dir:verify-email confirm \
--api-key 'My API Key' \
--dir-id 16635d38-75a6-4481-82e8-69af60e05011 \
--code 482915curl --request POST \
--url https://api.telnyx.com/v2/dir/{dir_id}/verify_email/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"code": "482915"
}
'{
"data": {
"record_type": "email_verification",
"email_verified": false,
"status": "sent",
"expires_at": "2026-07-30T17:15:00Z",
"sends_remaining_today": 9
}
}