Create a manual suppression
Creates a suppression with reason: manual_block and source: manual.
Caller-supplied reason / source are ignored; scope is
derived server-side from domain_id / from and is never
trusted. Idempotent: if a matching row already exists (NULL-safe
dedupe key: account_id, scope, to, reason, domain_id, from),
returns the existing record with 200 (no new audit event).
bounce_category, dsn_code, meta, and group_id are not
accepted on the public surface. Use the unsubscribe-group
suppression endpoint or the internal create surface for those.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const EmailBlock = await client.emailBlocks.create({
to: 'to',
});
console.log(EmailBlock.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_block = client.email_blocks.create(
to="to",
)
print(email_block.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"),
)
emailBlock, err := client.EmailBlocks.New(
context.TODO(),
telnyx.EmailBlockNewParams{
To: "to",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", emailBlock.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.emailBlocks.EmailBlockCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
EmailBlockCreateParams params = EmailBlockCreateParams.builder()
.to("to")
.build();
var response = client.emailBlocks().create(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_block = telnyx.email_blocks.create(to: "to")
puts(email_block)<?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_block = $client->emailBlocks->create(
to: 'to',
);
var_dump($email_block);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-blocks create \
--api-key 'My API Key' \
--to tocurl --request POST \
--url https://api.telnyx.com/v2/email_blocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "[email protected]",
"expires_at": "2026-12-31T23:59:59Z"
}
'{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_type": "email_block",
"domain_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"from": "string",
"to": "string",
"reason": "hard_bounce",
"source": "feedback",
"scope": "account",
"status": "active",
"created_at": "2024-01-23T18:10:02.574Z",
"updated_at": "2024-01-23T18:10:02.574Z",
"expires_at": "2024-01-23T18:10:02.574Z"
}
}{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_type": "email_block",
"domain_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"from": "string",
"to": "string",
"reason": "hard_bounce",
"source": "feedback",
"scope": "account",
"status": "active",
"created_at": "2024-01-23T18:10:02.574Z",
"updated_at": "2024-01-23T18:10:02.574Z",
"expires_at": "2024-01-23T18:10:02.574Z"
}
}{
"errors": [
{
"code": "10007",
"title": "Unauthorized",
"detail": "Missing authentication"
}
]
}{
"errors": [
{
"code": "406",
"title": "Not Acceptable",
"detail": "Not Acceptable"
}
]
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "can't be blank",
"source": {
"pointer": "/data/attributes/to"
}
}
]
}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.
Body
reason/source are forced to manual_block/manual (ignored if
supplied). scope is derived. bounce_category/dsn_code/meta/
group_id are not accepted on the public surface.
Response
Idempotent — matching suppression already existed.
Suppression record. Schema fields hidden by the view:
account_id, bounce_category, dsn_code, meta.
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 EmailBlock = await client.emailBlocks.create({
to: 'to',
});
console.log(EmailBlock.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_block = client.email_blocks.create(
to="to",
)
print(email_block.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"),
)
emailBlock, err := client.EmailBlocks.New(
context.TODO(),
telnyx.EmailBlockNewParams{
To: "to",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", emailBlock.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.emailBlocks.EmailBlockCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
EmailBlockCreateParams params = EmailBlockCreateParams.builder()
.to("to")
.build();
var response = client.emailBlocks().create(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
email_block = telnyx.email_blocks.create(to: "to")
puts(email_block)<?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_block = $client->emailBlocks->create(
to: 'to',
);
var_dump($email_block);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-blocks create \
--api-key 'My API Key' \
--to tocurl --request POST \
--url https://api.telnyx.com/v2/email_blocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "[email protected]",
"expires_at": "2026-12-31T23:59:59Z"
}
'{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_type": "email_block",
"domain_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"from": "string",
"to": "string",
"reason": "hard_bounce",
"source": "feedback",
"scope": "account",
"status": "active",
"created_at": "2024-01-23T18:10:02.574Z",
"updated_at": "2024-01-23T18:10:02.574Z",
"expires_at": "2024-01-23T18:10:02.574Z"
}
}{
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_type": "email_block",
"domain_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"group_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"from": "string",
"to": "string",
"reason": "hard_bounce",
"source": "feedback",
"scope": "account",
"status": "active",
"created_at": "2024-01-23T18:10:02.574Z",
"updated_at": "2024-01-23T18:10:02.574Z",
"expires_at": "2024-01-23T18:10:02.574Z"
}
}{
"errors": [
{
"code": "10007",
"title": "Unauthorized",
"detail": "Missing authentication"
}
]
}{
"errors": [
{
"code": "406",
"title": "Not Acceptable",
"detail": "Not Acceptable"
}
]
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "can't be blank",
"source": {
"pointer": "/data/attributes/to"
}
}
]
}