telnyx-ai-assistants-c…
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides Java SDK examples.
$ npx -y skills add team-telnyx/ai --skill telnyx-messaging-hosted-java --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/telnyx-messaging-hosted-javaContext preview
The summary Claude sees to decide when to auto-load this skill.
Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides Java SDK examples.
name: telnyx-messaging-hosted-java description: >- Set up hosted SMS numbers, toll-free verification, and RCS messaging. Use when migrating numbers or enabling rich messaging features. This skill provides Java SDK examples. metadata: author: telnyx product: messaging-hosted 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).
`POST /messages/rcs` — Required: `agent_id`, `to`, `messaging_profile_id`, `agent_message`
Optional: `mms_fallback` (object), `sms_fallback` (object), `type` (enum: RCS), `webhook_url` (url)
import com.telnyx.sdk.models.messages.RcsAgentMessage;
import com.telnyx.sdk.models.messages.rcs.RcSendParams;
import com.telnyx.sdk.models.messages.rcs.RcSendResponse;
RcSendParams params = RcSendParams.builder()
.agentId("Agent007")
.agentMessage(RcsAgentMessage.builder().build())
.messagingProfileId("550e8400-e29b-41d4-a716-446655440000")
.to("+13125551234")
.build();
RcSendResponse response = client.messages().rcs().send(params);Returns: `body` (object), `direction` (string), `encoding` (string), `from` (object), `id` (string), `messaging_profile_id` (string), `organization_id` (string), `received_at` (date-time), `record_type` (string), `to` (array[object]), `type` (string), `wait_seconds` (float)
Generate a deeplink URL that can be used to start an RCS conversation with a specific agent.
`GET /messages/rcs/deeplinks/{agent_id}`
import com.telnyx.sdk.models.messages.rcs.RcGenerateDeeplinkParams;
import com.telnyx.sdk.models.messages.rcs.RcGenerateDeeplinkResponse;
RcGenerateDeeplinkResponse response = client.messages().rcs().generateDeeplink("550e8400-e29b-41d4-a716-446655440000");Returns: `url` (string)
`GET /messaging/rcs/agents`
import com.telnyx.sdk.models.messaging.rcs.agents.AgentListPage; import com.telnyx.sdk.models.messaging.rcs.agents.AgentListParams; AgentListPage page = client.messaging().rcs().agents().list();
Returns: `agent_id` (string), `agent_name` (string), `created_at` (date-time), `enabled` (boolean), `profile_id` (uuid), `updated_at` (date-time), `user_id` (string), `webhook_failover_url` (url), `webhook_url` (url)
`GET /messaging/rcs/agents/{id}`
import com.telnyx.sdk.models.messaging.rcs.agents.AgentRetrieveParams;
import com.telnyx.sdk.models.rcsagents.RcsAgentResponse;
RcsAgentResponse rcsAgentResponse = client.messaging().rcs().agents().retrieve("550e8400-e29b-41d4-a716-446655440000");Returns: `agent_id` (string), `agent_name` (string), `created_at` (date-time), `enabled` (boolean), `profile_id` (uuid), `updated_at` (date-time), `user_id` (string), `webhook_failover_url` (url), `webhook_url` (url)
`PATCH /messaging/rcs/agents/{id}`
Optional: `profile_id` (uuid), `webhook_failover_url` (url), `webhook_url` (url)
import com.telnyx.sdk.models.messaging.rcs.agents.AgentUpdateParams;
import com.telnyx.sdk.models.rcsagents.RcsAgentResponse;
RcsAgentResponse rcsAgentResponse = client.messaging().rcs().agents().update("550e8400-e29b-41d4-a716-446655440000");Returns: `agent_id` (string), `agent_name` (string), `created_at` (date-time), `enabled` (boolean), `profile_id` (uuid), `updated_at` (date-time), `user_id` (string), `webhook_failover_url` (url), `webhook_url` (url)
`POST /messaging/rcs/bulk_capabilities` — Required: `agent_id`, `phone_numbers`
import com.telnyx.sdk.models.messaging.rcs.RcListBulkCapabilitiesParams;
import com.telnyx.sdk.models.messaging.rcs.RcListBulkCapabilitiesResponse;
RcListBulkCapabilitiesParams params = RcListBulkCapabilitiesParams.builder()
.agentId("TestAgent")
.addPhoneNumber("+13125551234")
.build();
RcListBulkCapabilitiesResponse response = client.messaging().rcs().listBulkCapabilities(params);Returns: `agent_id` (string), `agent_name` (string), `features` (array[string]), `phone_number` (string), `record_type` (enum: rcs.capabilities)
`GET /messaging/rcs/capabilities/{agent_id}/{phone_number}`
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.