Get a batch email validation job
Retrieves the current status and, once completed, validation results for a batch job.
GET
/
email_validations
/
batch
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const EmailValidationBatchDetail = await client.emailValidations.batch.retrieve('id');
console.log(EmailValidationBatchDetail.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_validation_batch_detail = client.email_validations.batch.retrieve(
"id",
)
print(email_validation_batch_detail.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"),
)
batch, err := client.EmailValidations.Batch.Get(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", batch.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.emailValidations().batch().retrieve("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_validation_batch_detail = telnyx.email_validations.batch.retrieve("id")
puts(email_validation_batch_detail)<?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_validation_batch_detail = $client->emailValidations->batch->retrieve(
'id',
);
var_dump($email_validation_batch_detail);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-validations:batch retrieve \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/email_validations/batch/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "email_validation_batch",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"total": 0,
"webhook_url": "https://example.com",
"completed_at": "2024-01-23T18:10:02.574Z"
}
}{
"errors": [
{
"code": "10006",
"title": "Not authorized",
"detail": "Invalid API key",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10006"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested resource was not found"
}
]
}Authorizations
Telnyx API key supplied as Authorization: Bearer <token>. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.
Path Parameters
Email validation batch UUID.
Response
Batch validation job status.
Shape returned by the GET endpoint. Does not include duplicates_removed.
Show child attributes
Show child attributes
Was this page helpful?
โI
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const EmailValidationBatchDetail = await client.emailValidations.batch.retrieve('id');
console.log(EmailValidationBatchDetail.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_validation_batch_detail = client.email_validations.batch.retrieve(
"id",
)
print(email_validation_batch_detail.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"),
)
batch, err := client.EmailValidations.Batch.Get(
context.TODO(),
"id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", batch.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.emailValidations().batch().retrieve("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_validation_batch_detail = telnyx.email_validations.batch.retrieve("id")
puts(email_validation_batch_detail)<?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_validation_batch_detail = $client->emailValidations->batch->retrieve(
'id',
);
var_dump($email_validation_batch_detail);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-validations:batch retrieve \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/email_validations/batch/{id} \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "email_validation_batch",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "pending",
"total": 0,
"webhook_url": "https://example.com",
"completed_at": "2024-01-23T18:10:02.574Z"
}
}{
"errors": [
{
"code": "10006",
"title": "Not authorized",
"detail": "Invalid API key",
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10006"
}
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested resource was not found"
}
]
}