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.
Claude Code
$ npx -y skills add team-telnyx/ai --skill telnyx-account-reports-java --agent claude-code
Codex
$ npx skills add team-telnyx/ai --skill telnyx-account-reports-java -a codex -y
Cursor
$ npx skills add team-telnyx/ai --skill telnyx-account-reports-java -a cursor -y
Gemini CLI
$ npx skills add team-telnyx/ai --skill telnyx-account-reports-java -a gemini-cli -y
GitHub Copilot
$ npx skills add team-telnyx/ai --skill telnyx-account-reports-java -a github-copilot -y
OpenCode
$ npx skills add team-telnyx/ai --skill telnyx-account-reports-java -a opencode -y
Windsurf
$ npx skills add team-telnyx/ai --skill telnyx-account-reports-java -a windsurf -y
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.95.0</version>
</dependency>
// Gradle
implementation("com.telnyx.sdk:telnyx:6.95.0")import com.telnyx.sdk.client.TelnyxClient; import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient; // fromEnv() reads TELNYX_API_KEY and TELNYX_PUBLIC_KEY (the public key is required for // client.webhooks().unwrap() — webhook verification) 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, then retry the request (bounded exponential backoff)
Thread.sleep(1000);
// ...retry the call here (give up after a few attempts)
}
throw e; // Re-throw: a failed request must never look like success to the caller
}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)
Create a ledger billing group report, which aggregates ledger activity by billing group.
`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)
Retrieve the details and status of a previously created ledger billing group report.
`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.MessagingC
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.
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.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.