List and search messages in an inbox
Lists inbound messages newest first. All access is scoped to the authenticated
account. filter[search] performs PostgreSQL full-text search over the subject,
plain-text body, and HTML body. Filters compose with stable cursor pagination.
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.messages.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.messages.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"),
)
messages, err := client.EmailInboxes.Messages.List(
context.TODO(),
"inbox_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", messages.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().messages().list("inbox_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.email_inboxes.messages.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->messages->list(
'inbox_id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-inboxes:messages list \
--api-key 'My API Key' \
--inbox-id inbox_idcurl --request GET \
--url https://api.telnyx.com/v2/email_inboxes/{inbox_id}/messages \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "55555555-5555-5555-5555-555555555555",
"record_type": "email_message",
"direction": "inbound",
"status": "received",
"inbox_id": "11111111-1111-1111-1111-111111111111",
"thread_id": "33333333-3333-3333-3333-333333333333",
"message_id": "<[email protected]>",
"in_reply_to": "<[email protected]>",
"references": [
"<[email protected]>"
],
"from": {
"email": "[email protected]",
"name": "Alice"
},
"to": [
{
"email": "[email protected]"
}
],
"cc": [],
"bcc": [],
"reply_to": [],
"subject": "Project update",
"text_body_url": null,
"html_body_url": null,
"reply_text": "Thanks, I will send it today.",
"has_quoted_text": true,
"headers": {},
"inline_files": [],
"attachments": [],
"labels": [],
"read_at": null,
"received_at": "2026-07-15T12:30:00Z",
"sent_at": null,
"created_at": "2026-07-15T12:30:00Z",
"updated_at": "2026-07-15T12:30:00Z"
}
],
"meta": {
"page_size": 25,
"page_cursor": "MjAyNi0wNy0xNVQxMjozMDowMFp8NTU1NTU1NTUtNTU1NS01NTU1LTU1NTUtNTU1NTU1NTU1NTU1"
}
}{
"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 messages are 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.
Query Parameters
Case-insensitive literal substring of the sender address.
Case-insensitive literal substring of the subject.
Inclusive ISO 8601 lower bound for the received timestamp.
Inclusive ISO 8601 upper bound for the received timestamp.
Whether the message has a read timestamp.
Whether the message has no read timestamp. Set to true to return only unread messages.
Returns only messages carrying this label. Matching is exact and case-sensitive. Reserved telnyx: labels can be filtered on even though they cannot be written by customers.
255Full-text query over subject and body, up to 500 characters.
500Number of results to return. Defaults to 25; maximum is 100.
1 <= x <= 100Opaque cursor returned by the previous page.
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
});
// Automatically fetches more pages as needed.
for await (const response of client.emailInboxes.messages.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.messages.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"),
)
messages, err := client.EmailInboxes.Messages.List(
context.TODO(),
"inbox_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", messages.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().messages().list("inbox_id");
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.email_inboxes.messages.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->messages->list(
'inbox_id',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx email-inboxes:messages list \
--api-key 'My API Key' \
--inbox-id inbox_idcurl --request GET \
--url https://api.telnyx.com/v2/email_inboxes/{inbox_id}/messages \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "55555555-5555-5555-5555-555555555555",
"record_type": "email_message",
"direction": "inbound",
"status": "received",
"inbox_id": "11111111-1111-1111-1111-111111111111",
"thread_id": "33333333-3333-3333-3333-333333333333",
"message_id": "<[email protected]>",
"in_reply_to": "<[email protected]>",
"references": [
"<[email protected]>"
],
"from": {
"email": "[email protected]",
"name": "Alice"
},
"to": [
{
"email": "[email protected]"
}
],
"cc": [],
"bcc": [],
"reply_to": [],
"subject": "Project update",
"text_body_url": null,
"html_body_url": null,
"reply_text": "Thanks, I will send it today.",
"has_quoted_text": true,
"headers": {},
"inline_files": [],
"attachments": [],
"labels": [],
"read_at": null,
"received_at": "2026-07-15T12:30:00Z",
"sent_at": null,
"created_at": "2026-07-15T12:30:00Z",
"updated_at": "2026-07-15T12:30:00Z"
}
],
"meta": {
"page_size": 25,
"page_cursor": "MjAyNi0wNy0xNVQxMjozMDowMFp8NTU1NTU1NTUtNTU1NS01NTU1LTU1NTUtNTU1NTU1NTU1NTU1"
}
}{
"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 messages are temporarily unavailable. Please try again later."
}
]
}