List sender filters for an inbox
Returns the inboxโs sender allowlist and blocklist. Entries are normalized to lowercase. A blocklist match takes precedence over an allowlist match; when both lists are empty, all senders are accepted.
GET
/
email_inboxes
/
{inbox_id}
/
filters
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.emailInboxes.filters.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.email_inboxes.filters.list(
"inbox_id",
)
print(page)
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"),
)
filters, err := client.EmailInboxes.Filters.List(
context.TODO(),
"inbox_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", filters.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 page = client.emailInboxes().filters().list("inbox_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.email_inboxes.filters.list("inbox_id")
puts(page)<?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 {
$page = $client->emailInboxes->filters->list(
'inbox_id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-inboxes:filters list \
--api-key 'My API Key' \
--inbox-id inbox_idcurl --request GET \
--url https://api.telnyx.com/v2/email_inboxes/{inbox_id}/filters \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "email_inbox_filters",
"allowlist": [
"trusted@example.com",
"@partner.example"
],
"blocklist": [
"@spam.example"
]
}
}{
"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"
}
]
}{
"errors": [
{
"code": "10016",
"title": "Service Unavailable",
"detail": "The email domain service is temporarily unavailable. Please try again later."
}
]
}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 inbox UUID.
Response
The inbox's current sender allowlist and blocklist.
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
});
// Automatically fetches more pages as needed.
for await (const response of client.emailInboxes.filters.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.email_inboxes.filters.list(
"inbox_id",
)
print(page)
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"),
)
filters, err := client.EmailInboxes.Filters.List(
context.TODO(),
"inbox_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", filters.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 page = client.emailInboxes().filters().list("inbox_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.email_inboxes.filters.list("inbox_id")
puts(page)<?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 {
$page = $client->emailInboxes->filters->list(
'inbox_id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-inboxes:filters list \
--api-key 'My API Key' \
--inbox-id inbox_idcurl --request GET \
--url https://api.telnyx.com/v2/email_inboxes/{inbox_id}/filters \
--header 'Authorization: Bearer <token>'{
"data": {
"record_type": "email_inbox_filters",
"allowlist": [
"trusted@example.com",
"@partner.example"
],
"blocklist": [
"@spam.example"
]
}
}{
"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"
}
]
}{
"errors": [
{
"code": "10016",
"title": "Service Unavailable",
"detail": "The email domain service is temporarily unavailable. Please try again later."
}
]
}