List unsubscribe groups
Offset pagination only (page[number] default 1, page[size]
default 25, max 100). No sort/filter/cursor — ordering fixed
desc created_at, desc id. Uses the shared QueryParser.parse_offset/1
— a malformed page (e.g. flat ?page=1 instead of
?page[number]=1) returns 400 (code 10015), consistent with
GET /v2/email_blocks. meta includes total_pages.
GET
/
email_unsubscribe_groups
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.emailUnsubscribeGroups.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_unsubscribe_groups.list()
print(page.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"),
)
emailUnsubscribeGroups, err := client.EmailUnsubscribeGroups.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", emailUnsubscribeGroups.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.emailUnsubscribeGroups().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.email_unsubscribe_groups.list
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->emailUnsubscribeGroups->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-unsubscribe-groups list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/email_unsubscribe_groups \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_type": "email_unsubscribe_group",
"name": "string",
"description": "string",
"created_at": "2024-01-23T18:10:02.574Z",
"updated_at": "2024-01-23T18:10:02.574Z"
}
],
"meta": {
"page_number": 0,
"page_size": 0,
"total_pages": 0,
"total_results": 0
}
}{
"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
Offset page number (≥1, default 1).
Required range:
x >= 1Page size (1–100, default 25).
Required range:
1 <= x <= 100Was this page helpful?
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.emailUnsubscribeGroups.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_unsubscribe_groups.list()
print(page.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"),
)
emailUnsubscribeGroups, err := client.EmailUnsubscribeGroups.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", emailUnsubscribeGroups.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.emailUnsubscribeGroups().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.email_unsubscribe_groups.list
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->emailUnsubscribeGroups->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-unsubscribe-groups list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/email_unsubscribe_groups \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"record_type": "email_unsubscribe_group",
"name": "string",
"description": "string",
"created_at": "2024-01-23T18:10:02.574Z",
"updated_at": "2024-01-23T18:10:02.574Z"
}
],
"meta": {
"page_number": 0,
"page_size": 0,
"total_pages": 0,
"total_results": 0
}
}{
"errors": [
{
"code": "10007",
"title": "Unauthorized",
"detail": "Missing authentication"
}
]
}{
"errors": [
{
"code": "406",
"title": "Not Acceptable",
"detail": "Not Acceptable"
}
]
}