List threads in an inbox
Lists thread summaries newest first using stable cursor pagination.
GET
/
email_inboxes
/
{inbox_id}
/
threads
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.threads.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.threads.list(
"inbox_id",
)
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"),
)
threads, err := client.EmailInboxes.Threads.List(
context.TODO(),
"inbox_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", threads.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().threads().list("inbox_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.email_inboxes.threads.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->threads->list(
'inbox_id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-inboxes:threads list \
--api-key 'My API Key' \
--inbox-id inbox_idcurl --request GET \
--url https://api.telnyx.com/v2/email_inboxes/{inbox_id}/threads \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "33333333-3333-3333-3333-333333333333",
"record_type": "email_thread",
"inbox_id": "11111111-1111-1111-1111-111111111111",
"subject": "Project update",
"preview": null,
"message_count": 2,
"unread_count": 1,
"last_message_id": "55555555-5555-5555-5555-555555555555",
"last_message_at": "2026-07-15T12:30:00Z",
"created_at": "2026-07-14T10:00:00Z",
"updated_at": "2026-07-15T12:30:00Z",
"labels": [
"needs_review"
]
}
],
"meta": {
"page_size": 25,
"page_cursor": "MjAyNi0wNy0xNVQxMjozMDowMFp8MzMzMzMzMzMtMzMzMy0zMzMzLTMzMzMtMzMzMzMzMzMzMzMz"
}
}{
"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": "10015",
"title": "Validation Failed",
"detail": "subject can't be blank",
"source": {
"pointer": "/data/attributes/subject"
}
}
]
}{
"errors": [
{
"code": "10016",
"title": "Service Unavailable",
"detail": "Inbox threads are temporarily unavailable. Please try again later."
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Email inbox UUID.
Query Parameters
Number of results to return. Defaults to 25; maximum is 100.
Required range:
1 <= x <= 100Opaque cursor returned by the previous page.
Returns only threads carrying this label. Thread labels are independent of the labels on the thread's messages.
Maximum string length:
255Was 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.threads.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.threads.list(
"inbox_id",
)
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"),
)
threads, err := client.EmailInboxes.Threads.List(
context.TODO(),
"inbox_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", threads.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().threads().list("inbox_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.email_inboxes.threads.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->threads->list(
'inbox_id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-inboxes:threads list \
--api-key 'My API Key' \
--inbox-id inbox_idcurl --request GET \
--url https://api.telnyx.com/v2/email_inboxes/{inbox_id}/threads \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "33333333-3333-3333-3333-333333333333",
"record_type": "email_thread",
"inbox_id": "11111111-1111-1111-1111-111111111111",
"subject": "Project update",
"preview": null,
"message_count": 2,
"unread_count": 1,
"last_message_id": "55555555-5555-5555-5555-555555555555",
"last_message_at": "2026-07-15T12:30:00Z",
"created_at": "2026-07-14T10:00:00Z",
"updated_at": "2026-07-15T12:30:00Z",
"labels": [
"needs_review"
]
}
],
"meta": {
"page_size": 25,
"page_cursor": "MjAyNi0wNy0xNVQxMjozMDowMFp8MzMzMzMzMzMtMzMzMy0zMzMzLTMzMzMtMzMzMzMzMzMzMzMz"
}
}{
"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": "10015",
"title": "Validation Failed",
"detail": "subject can't be blank",
"source": {
"pointer": "/data/attributes/subject"
}
}
]
}{
"errors": [
{
"code": "10016",
"title": "Service Unavailable",
"detail": "Inbox threads are temporarily unavailable. Please try again later."
}
]
}