telnyx-ai-assistants-c…
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Generate and retrieve usage reports for billing, analytics, and reconciliation. This skill provides Java SDK examples.
$ npx -y skills add team-telnyx/ai --skill telnyx-account-reports-java --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/telnyx-account-reports-javaContext preview
The summary Claude sees to decide when to auto-load this skill.
Generate and retrieve usage reports for billing, analytics, and reconciliation. This skill provides Java SDK examples.
name: telnyx-account-reports-java description: >- Generate and retrieve usage reports for billing, analytics, and reconciliation. This skill provides Java SDK examples. metadata: author: telnyx product: account-reports language: java generated_by: telnyx-openapi-pipeline
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- Maven -->
<dependency>
<groupId>com.telnyx.sdk</groupId>
<artifactId>telnyx</artifactId>
<version>6.89.0</version>
</dependency>
// Gradle
implementation("com.telnyx.sdk:telnyx:6.89.0")import com.telnyx.sdk.client.TelnyxClient; import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient; TelnyxClient client = TelnyxOkHttpClient.fromEnv();
All examples below assume `client` is already initialized as shown above.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
import com.telnyx.sdk.errors.TelnyxServiceException;
try {
var result = client.messages().send(params);
} catch (TelnyxServiceException e) {
System.err.println("API error " + e.statusCode() + ": " + e.getMessage());
if (e.statusCode() == 422) {
System.err.println("Validation error — check required fields and formats");
} else if (e.statusCode() == 429) {
// Rate limited — wait and retry with exponential backoff
Thread.sleep(1000);
}
}Common error codes: `401` invalid API key, `403` insufficient permissions, `404` resource not found, `422` validation error (check field formats), `429` rate limited (retry with exponential backoff).
Filters call events by given filter parameters. Events are ordered by `occurred_at`. If filter for `leg_id` or `application_session_id` is not present, it only filters events from the last 24 hours.
`GET /call_events`
import com.telnyx.sdk.models.callevents.CallEventListPage; import com.telnyx.sdk.models.callevents.CallEventListParams; CallEventListPage page = client.callEvents().list();
Returns: `call_leg_id` (string), `call_session_id` (string), `event_timestamp` (string), `metadata` (object), `name` (string), `record_type` (enum: call_event), `type` (enum: command, webhook)
`POST /ledger_billing_group_reports`
Optional: `month` (integer), `year` (integer)
import com.telnyx.sdk.models.ledgerbillinggroupreports.LedgerBillingGroupReportCreateParams; import com.telnyx.sdk.models.ledgerbillinggroupreports.LedgerBillingGroupReportCreateResponse; LedgerBillingGroupReportCreateResponse ledgerBillingGroupReport = client.ledgerBillingGroupReports().create();
Returns: `created_at` (date-time), `id` (uuid), `organization_id` (uuid), `record_type` (enum: ledger_billing_group_report), `report_url` (uri), `status` (enum: pending, complete, failed, deleted), `updated_at` (date-time)
`GET /ledger_billing_group_reports/{id}`
import com.telnyx.sdk.models.ledgerbillinggroupreports.LedgerBillingGroupReportRetrieveParams;
import com.telnyx.sdk.models.ledgerbillinggroupreports.LedgerBillingGroupReportRetrieveResponse;
LedgerBillingGroupReportRetrieveResponse ledgerBillingGroupReport = client.ledgerBillingGroupReports().retrieve("f5586561-8ff0-4291-a0ac-84fe544797bd");Returns: `created_at` (date-time), `id` (uuid), `organization_id` (uuid), `record_type` (enum: ledger_billing_group_report), `report_url` (uri), `status` (enum: pending, complete, failed, deleted), `updated_at` (date-time)
Retrieves all MDR detailed report requests for the authenticated user
`GET /legacy/reporting/batch_detail_records/messaging`
import com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.messaging.MessagingListParams; import com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.messaging.MessagingListResponse; MessagingListResponse messagings = client.legacy().reporting().batchDetailRecords().messaging().list();
Returns: `connections` (array[integer]), `created_at` (date-time), `directions` (array[string]), `end_date` (date-time), `filters` (array[object]), `id` (uuid), `profiles` (array[string]), `record_type` (string), `record_types` (array[string]), `report_name` (string), `report_url` (string), `start_date` (date-time), `status` (enum: PENDING, COMPLETE, FAILED, EXPIRED), `updated_at` (date-time)
Creates a new MDR detailed report request with the specified filters
`POST /legacy/reporting/batch_detail_records/messaging` — Required: `start_time`, `end_time`
Optional: `connections` (array[integer]), `directions` (array[integer]), `filters` (array[object]), `include_message_body` (boolean), `managed_accounts` (array[string]), `profiles` (array[string]), `record_types` (array[integer]), `report_name` (string), `select_all_managed_accounts` (boolean), `timezone` (string)
import com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.messaging.MessagingCreateParams;
import com.telnyx.sdk.models.legacy.reporting.batchdetailrecords.messaging.MessagingCreateResponse;
import java.time.OffsetDateTime;
MessagingCreateParams params = MessagingCreateParams.builder()
.endTime(OffsetDateTime.parse("2024-02-12T23:59:59Z"))
.startTime(OffsetDateTime.parse("2024-02-01T00:00:00Z"))
.build();
MessagingCreateResponse messaging = client.legacy().reporting().batchDetailRecords().messaging().create(params);Returns: `connections` (array[integer]), `created_at` (date-time), `directions` (array[string]), `end_date` (date-time), `fi
This repo is the one-stop shop for AI Agents and AI-first developers building with Telnyx — everything an agent needs to build production-grade applications and manage its account, from signup to funding.
Repo: team-telnyx/ai
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.