List audit events for a suppression
Offset pagination only (page[number] default 1, page[size]
default 50, max 100). No sort, no filter, no cursor —
ordering is fixed desc occurred_at, desc id. Verifies the block
belongs to the account first (cross-account → 404).
GET
/
email_blocks
/
{id}
/
events
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.emailBlocks.retrieveEvents('id');
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_events(
"id",
)
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.GetEvents(
context.TODO(),
"id",
)
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().retrieveEvents("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.email_blocks.retrieve_events("id")
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->retrieveEvents(
'id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-blocks retrieve-events \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/email_blocks/{id}/events \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_type": "email_block_event",
"event_type": "created",
"reason": "string",
"source": "string",
"actor": "string",
"occurred_at": "2024-01-23T18:10:02.574Z"
}
],
"meta": {
"page_number": 0,
"page_size": 0,
"total_pages": 0,
"total_results": 0
}
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "is invalid",
"source": {
"pointer": "/filter[reason]"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unauthorized",
"detail": "Missing authentication"
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested email block was not found"
}
]
}{
"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.
Path Parameters
Resource UUID. Malformed UUIDs are treated as not-found (not 400).
Query Parameters
Offset page number (≥1, default 1).
Required range:
x >= 1Page size (default 50, max 100).
Required range:
1 <= x <= 100Was 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 response = await client.emailBlocks.retrieveEvents('id');
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_events(
"id",
)
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.GetEvents(
context.TODO(),
"id",
)
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().retrieveEvents("id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
response = telnyx.email_blocks.retrieve_events("id")
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->retrieveEvents(
'id',
);
var_dump($response);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-blocks retrieve-events \
--api-key 'My API Key' \
--id idcurl --request GET \
--url https://api.telnyx.com/v2/email_blocks/{id}/events \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_type": "email_block_event",
"event_type": "created",
"reason": "string",
"source": "string",
"actor": "string",
"occurred_at": "2024-01-23T18:10:02.574Z"
}
],
"meta": {
"page_number": 0,
"page_size": 0,
"total_pages": 0,
"total_results": 0
}
}{
"errors": [
{
"code": "10015",
"title": "Validation Failed",
"detail": "is invalid",
"source": {
"pointer": "/filter[reason]"
}
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unauthorized",
"detail": "Missing authentication"
}
]
}{
"errors": [
{
"code": "10001",
"title": "Not Found",
"detail": "The requested email block was not found"
}
]
}{
"errors": [
{
"code": "406",
"title": "Not Acceptable",
"detail": "Not Acceptable"
}
]
}