List Audit Logs
Retrieve a list of audit log entries. Audit logs are a best-effort, eventually consistent record of significant account-related changes.
GET
/
audit_events
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 auditEventListResponse of client.auditEvents.list()) {
console.log(auditEventListResponse.id);
}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.audit_events.list()
page = page.data[0]
print(page.id)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"),
)
page, err := client.AuditEvents.List(context.TODO(), telnyx.AuditEventListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.auditevents.AuditEventListPage;
import com.telnyx.sdk.models.auditevents.AuditEventListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AuditEventListPage page = client.auditEvents().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.audit_events.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->auditEvents->list(
filter: [
'createdAfter' => new \DateTimeImmutable('2021-01-04T00:00:00Z'),
'createdBefore' => new \DateTimeImmutable('2021-01-04T00:00:00Z'),
],
pageNumber: 0,
pageSize: 0,
sort: 'desc',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx audit-events list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/audit_events \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440001",
"record_type": "audit_event",
"resource_id": "550e8400-e29b-41d4-a716-446655440002",
"alternate_resource_id": "+14155551234",
"change_made_by": "organization_member",
"changes": [
{
"field": "field.name",
"to": "old value",
"from": "new value"
}
],
"organization_id": "550e8400-e29b-41d4-a716-446655440003",
"change_type": "update",
"created_at": "2026-01-03T00:00:00Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 50,
"page_number": 1,
"page_size": 10
}
}{
"errors": [
{
"code": "10001",
"title": "Unauthorized",
"detail": "The request requires user authentication."
}
]
}{
"errors": [
{
"code": "10001",
"title": "Unauthorized",
"detail": "The request requires user authentication."
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Consolidated page parameter (deepObject style). Originally: page[number], page[size]
Show child attributes
Show child attributes
Consolidated filter parameter (deepObject style). Originally: filter[created_before], filter[created_after]
Show child attributes
Show child attributes
Set the order of the results by the creation date.
Available options:
asc, desc Example:
"desc"
Was 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 auditEventListResponse of client.auditEvents.list()) {
console.log(auditEventListResponse.id);
}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.audit_events.list()
page = page.data[0]
print(page.id)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"),
)
page, err := client.AuditEvents.List(context.TODO(), telnyx.AuditEventListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.auditevents.AuditEventListPage;
import com.telnyx.sdk.models.auditevents.AuditEventListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
AuditEventListPage page = client.auditEvents().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.audit_events.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->auditEvents->list(
filter: [
'createdAfter' => new \DateTimeImmutable('2021-01-04T00:00:00Z'),
'createdBefore' => new \DateTimeImmutable('2021-01-04T00:00:00Z'),
],
pageNumber: 0,
pageSize: 0,
sort: 'desc',
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx audit-events list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/audit_events \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "550e8400-e29b-41d4-a716-446655440001",
"record_type": "audit_event",
"resource_id": "550e8400-e29b-41d4-a716-446655440002",
"alternate_resource_id": "+14155551234",
"change_made_by": "organization_member",
"changes": [
{
"field": "field.name",
"to": "old value",
"from": "new value"
}
],
"organization_id": "550e8400-e29b-41d4-a716-446655440003",
"change_type": "update",
"created_at": "2026-01-03T00:00:00Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 50,
"page_number": 1,
"page_size": 10
}
}{
"errors": [
{
"code": "10001",
"title": "Unauthorized",
"detail": "The request requires user authentication."
}
]
}{
"errors": [
{
"code": "10001",
"title": "Unauthorized",
"detail": "The request requires user authentication."
}
]
}