Check out our upcoming events and meetups! View events →
Retrieve a list of opt-out blocks.
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 messagingOptoutListResponse of client.messagingOptouts.list()) {
console.log(messagingOptoutListResponse.messaging_profile_id);
}{
"data": [
{
"from": "<string>",
"to": "+E.164",
"messaging_profile_id": "<string>",
"keyword": "STOP",
"created_at": "2025-04-28 12:00:38.631252+00:00"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
If receiving address (+E.164 formatted phone number) should be redacted
Consolidated filter parameter (deepObject style). Originally: filter[messaging_profile_id], filter[from]
Show child attributes
Consolidated page parameter (deepObject style). Originally: page[number], page[size]
Show child attributes
Consolidated created_at parameter (deepObject style). Originally: created_at[gte], created_at[lte]
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
});
// Automatically fetches more pages as needed.
for await (const messagingOptoutListResponse of client.messagingOptouts.list()) {
console.log(messagingOptoutListResponse.messaging_profile_id);
}{
"data": [
{
"from": "<string>",
"to": "+E.164",
"messaging_profile_id": "<string>",
"keyword": "STOP",
"created_at": "2025-04-28 12:00:38.631252+00:00"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}