Export suppressions as CSV
Streams the account’s suppressions as a chunked CSV (server-side
cursor; never materialized). Content-type text/csv, header
Content-Disposition: attachment; filename="email_blocks_export.csv".
Filters (filter[reason], filter[domain_id],
filter[created_after], filter[created_before]) are the only
params that affect output. sort and page[*] are parsed
(bad values still produce 400) but ignored — rows stream
ORDER BY created_at ASC, id ASC with no pagination.
CSV columns: id,to,from,reason,source,scope,status,domain_id, created_at,updated_at,expires_at,group_id,bounce_category,dsn_code, meta (15 columns). The first 12 columns are the stable native
signature; bounce_category, dsn_code, and meta are optional
backup fields (empty when unset). The CSV carries the group_id
column so group-scoped suppressions’ group link survives the
export (empty for account-scope rows).
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.emailBlocks.retrieveExport();
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.email_blocks.retrieve_export()
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.EmailBlocks.GetExport(context.TODO())
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;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.emailBlocks().retrieveExport();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.email_blocks.retrieve_export
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->emailBlocks->retrieveExport();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-blocks retrieve-export \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/email_blocks/export \
--header 'Authorization: Bearer <token>'string{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "is invalid",
"source": {
"pointer": "/filter[reason]"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unauthorized",
"detail": "Missing authentication"
}
]
}{
"errors": [
{
"code": "406",
"title": "Not Acceptable",
"detail": "Not Acceptable"
}
]
}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.
Query Parameters
Sort field. Leading - = desc; only created_at is sortable. Default -created_at. -- is an error.
created_at, -created_at Offset page number (≥1, default 1).
x >= 1Page size (1–100, default 25).
1 <= x <= 100Exact-match filter on reason.
hard_bounce, spam_complaint, unsubscribe, invalid, manual_block Exact-match filter on domain_id (UUID).
created_at > value (ISO 8601).
created_at < value (ISO 8601).
Response
CSV stream.
CSV with header row id,to,from,reason,source,scope,status,domain_id,created_at,updated_at,expires_at,group_id,bounce_category,dsn_code,meta.
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 response = await client.emailBlocks.retrieveExport();
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.email_blocks.retrieve_export()
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.EmailBlocks.GetExport(context.TODO())
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;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var response = client.emailBlocks().retrieveExport();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.email_blocks.retrieve_export
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->emailBlocks->retrieveExport();
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-blocks retrieve-export \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/email_blocks/export \
--header 'Authorization: Bearer <token>'string{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "is invalid",
"source": {
"pointer": "/filter[reason]"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unauthorized",
"detail": "Missing authentication"
}
]
}{
"errors": [
{
"code": "406",
"title": "Not Acceptable",
"detail": "Not Acceptable"
}
]
}