telnyx-numbers-config-java
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
Telnyx Numbers Config - Java
Telnyx 号码配置 - Java
Installation
安装
text
<!-- Maven -->
<dependency>
<groupId>com.telnyx.sdk</groupId>
<artifactId>telnyx</artifactId>
<version>6.36.0</version>
</dependency>
// Gradle
implementation("com.telnyx.sdk:telnyx:6.36.0")text
<!-- Maven -->
<dependency>
<groupId>com.telnyx.sdk</groupId>
<artifactId>telnyx</artifactId>
<version>6.36.0</version>
</dependency>
// Gradle
implementation("com.telnyx.sdk:telnyx:6.36.0")Setup
环境配置
java
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
TelnyxClient client = TelnyxOkHttpClient.fromEnv();All examples below assume is already initialized as shown above.
clientjava
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
TelnyxClient client = TelnyxOkHttpClient.fromEnv();以下所有示例均假定已经按照上述方式完成初始化。
clientError Handling
错误处理
All API calls can fail with network errors, rate limits (429), validation errors (422),
or authentication errors (401). Always handle errors in production code:
java
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: invalid API key, insufficient permissions,
resource not found, validation error (check field formats),
rate limited (retry with exponential backoff).
401403404422429所有API调用都可能因网络错误、速率限制(429)、验证错误(422)或身份验证错误(401)而失败。在生产代码中请务必做好错误处理:
java
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);
}
}常见错误码: API密钥无效, 权限不足, 资源不存在, 验证错误(请检查字段格式), 触发速率限制(请使用指数退避策略重试)。
401403404422429Important Notes
重要注意事项
- Phone numbers must be in E.164 format (e.g., ). Include the
+13125550001prefix and country code. No spaces, dashes, or parentheses.+ - Pagination: List methods return a page. Use for automatic iteration:
.autoPager(). For manual control, usefor (var item : page.autoPager()) { ... }and.hasNextPage()..nextPage()
- 电话号码必须采用E.164格式(例如),需包含
+13125550001前缀和国家代码,不允许使用空格、短横线或括号。+ - 分页: 列表方法返回单页数据。使用可实现自动遍历:
.autoPager()。如需手动控制,可使用for (var item : page.autoPager()) { ... }和.hasNextPage()方法。.nextPage()
Bulk update phone number profiles
批量更新电话号码配置文件
POST /messaging_numbers_bulk_updatesmessaging_profile_idnumbersOptional: (boolean)
assign_onlyjava
import com.telnyx.sdk.models.messagingnumbersbulkupdates.MessagingNumbersBulkUpdateCreateParams;
import com.telnyx.sdk.models.messagingnumbersbulkupdates.MessagingNumbersBulkUpdateCreateResponse;
import java.util.List;
MessagingNumbersBulkUpdateCreateParams params = MessagingNumbersBulkUpdateCreateParams.builder()
.messagingProfileId("00000000-0000-0000-0000-000000000000")
.numbers(List.of(
"+18880000000",
"+18880000001",
"+18880000002"
))
.build();
MessagingNumbersBulkUpdateCreateResponse messagingNumbersBulkUpdate = client.messagingNumbersBulkUpdates().create(params);Returns: (array[string]), (uuid), (array[string]), (enum: messaging_numbers_bulk_update), (array[string])
failedorder_idpendingrecord_typesuccessPOST /messaging_numbers_bulk_updatesmessaging_profile_idnumbers可选参数:(布尔值)
assign_onlyjava
import com.telnyx.sdk.models.messagingnumbersbulkupdates.MessagingNumbersBulkUpdateCreateParams;
import com.telnyx.sdk.models.messagingnumbersbulkupdates.MessagingNumbersBulkUpdateCreateResponse;
import java.util.List;
MessagingNumbersBulkUpdateCreateParams params = MessagingNumbersBulkUpdateCreateParams.builder()
.messagingProfileId("00000000-0000-0000-0000-000000000000")
.numbers(List.of(
"+18880000000",
"+18880000001",
"+18880000002"
))
.build();
MessagingNumbersBulkUpdateCreateResponse messagingNumbersBulkUpdate = client.messagingNumbersBulkUpdates().create(params);返回值:(字符串数组)、(uuid)、(字符串数组)、(枚举值:messaging_numbers_bulk_update)、(字符串数组)
failedorder_idpendingrecord_typesuccessRetrieve bulk update status
查询批量更新状态
GET /messaging_numbers_bulk_updates/{order_id}java
import com.telnyx.sdk.models.messagingnumbersbulkupdates.MessagingNumbersBulkUpdateRetrieveParams;
import com.telnyx.sdk.models.messagingnumbersbulkupdates.MessagingNumbersBulkUpdateRetrieveResponse;
MessagingNumbersBulkUpdateRetrieveResponse messagingNumbersBulkUpdate = client.messagingNumbersBulkUpdates().retrieve("550e8400-e29b-41d4-a716-446655440000");Returns: (array[string]), (uuid), (array[string]), (enum: messaging_numbers_bulk_update), (array[string])
failedorder_idpendingrecord_typesuccessGET /messaging_numbers_bulk_updates/{order_id}java
import com.telnyx.sdk.models.messagingnumbersbulkupdates.MessagingNumbersBulkUpdateRetrieveParams;
import com.telnyx.sdk.models.messagingnumbersbulkupdates.MessagingNumbersBulkUpdateRetrieveResponse;
MessagingNumbersBulkUpdateRetrieveResponse messagingNumbersBulkUpdate = client.messagingNumbersBulkUpdates().retrieve("550e8400-e29b-41d4-a716-446655440000");返回值:(字符串数组)、(uuid)、(字符串数组)、(枚举值:messaging_numbers_bulk_update)、(字符串数组)
failedorder_idpendingrecord_typesuccessList mobile phone numbers with messaging settings
列出带消息配置的移动电话号码
GET /mobile_phone_numbers/messagingjava
import com.telnyx.sdk.models.mobilephonenumbers.messaging.MessagingListPage;
import com.telnyx.sdk.models.mobilephonenumbers.messaging.MessagingListParams;
MessagingListPage page = client.mobilePhoneNumbers().messaging().list();Returns: (string), (date-time), (object), (string), (string), (string | null), (string), (string), (enum: messaging_phone_number, messaging_settings), (array[string]), (string), (enum: longcode), (date-time)
country_codecreated_atfeaturesidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atGET /mobile_phone_numbers/messagingjava
import com.telnyx.sdk.models.mobilephonenumbers.messaging.MessagingListPage;
import com.telnyx.sdk.models.mobilephonenumbers.messaging.MessagingListParams;
MessagingListPage page = client.mobilePhoneNumbers().messaging().list();返回值:(字符串)、(日期时间)、(对象)、(字符串)、(字符串)、(字符串 | 空)、(字符串)、(字符串)、(枚举值:messaging_phone_number、messaging_settings)、(字符串数组)、(字符串)、(枚举值:longcode)、(日期时间)
country_codecreated_atfeaturesidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atRetrieve a mobile phone number with messaging settings
查询单个带消息配置的移动电话号码
GET /mobile_phone_numbers/{id}/messagingjava
import com.telnyx.sdk.models.mobilephonenumbers.messaging.MessagingRetrieveParams;
import com.telnyx.sdk.models.mobilephonenumbers.messaging.MessagingRetrieveResponse;
MessagingRetrieveResponse messaging = client.mobilePhoneNumbers().messaging().retrieve("550e8400-e29b-41d4-a716-446655440000");Returns: (string), (date-time), (object), (string), (string), (string | null), (string), (string), (enum: messaging_phone_number, messaging_settings), (array[string]), (string), (enum: longcode), (date-time)
country_codecreated_atfeaturesidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atGET /mobile_phone_numbers/{id}/messagingjava
import com.telnyx.sdk.models.mobilephonenumbers.messaging.MessagingRetrieveParams;
import com.telnyx.sdk.models.mobilephonenumbers.messaging.MessagingRetrieveResponse;
MessagingRetrieveResponse messaging = client.mobilePhoneNumbers().messaging().retrieve("550e8400-e29b-41d4-a716-446655440000");返回值:(字符串)、(日期时间)、(对象)、(字符串)、(字符串)、(字符串 | 空)、(字符串)、(字符串)、(枚举值:messaging_phone_number、messaging_settings)、(字符串数组)、(字符串)、(枚举值:longcode)、(日期时间)
country_codecreated_atfeaturesidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atList phone numbers
列出电话号码
GET /phone_numbersjava
import com.telnyx.sdk.models.phonenumbers.PhoneNumberListPage;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberListParams;
PhoneNumberListPage page = client.phoneNumbers().list();Returns: (string | null), (boolean), (boolean), (boolean), (boolean), (string | null), (string | null), (string), (date-time), (string | null), (boolean), (string | null), (boolean), (enum: active, deprovisioning, disabled, provisioning, provisioning-failed), (string | null), (boolean), (string), (enum: disabled, reject_calls, flag_calls), (string | null), (string | null), (string), (enum: local, toll_free, mobile, national, shared_cost, landline, tollfree, shortcode, longcode), (string), (string), (object), (enum: purchase-pending, purchase-failed, port-pending, port-failed, active, deleted, emergency-only, ported-out, port-out-pending, requirement-info-pending, requirement-info-under-review, requirement-info-exception, provision-pending), (boolean), (array[string]), (string)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idconnection_namecountry_iso_alpha2created_atcustomer_referencedeletion_lock_enabledemergency_address_idemergency_enabledemergency_statusexternal_pinhd_voice_enabledidinbound_call_screeningmessaging_profile_idmessaging_profile_namephone_numberphone_number_typepurchased_atrecord_typesource_typestatust38_fax_gateway_enabledtagsupdated_atGET /phone_numbersjava
import com.telnyx.sdk.models.phonenumbers.PhoneNumberListPage;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberListParams;
PhoneNumberListPage page = client.phoneNumbers().list();返回值:(字符串 | 空)、(布尔值)、(布尔值)、(布尔值)、(布尔值)、(字符串 | 空)、(字符串 | 空)、(字符串)、(日期时间)、(字符串 | 空)、(布尔值)、(字符串 | 空)、(布尔值)、(枚举值:active、deprovisioning、disabled、provisioning、provisioning-failed)、(字符串 | 空)、(布尔值)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(字符串 | 空)、(字符串 | 空)、(字符串)、(枚举值:local、toll_free、mobile、national、shared_cost、landline、tollfree、shortcode、longcode)、(字符串)、(字符串)、(对象)、(枚举值:purchase-pending、purchase-failed、port-pending、port-failed、active、deleted、emergency-only、ported-out、port-out-pending、requirement-info-pending、requirement-info-under-review、requirement-info-exception、provision-pending)、(布尔值)、(字符串数组)、(字符串)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idconnection_namecountry_iso_alpha2created_atcustomer_referencedeletion_lock_enabledemergency_address_idemergency_enabledemergency_statusexternal_pinhd_voice_enabledidinbound_call_screeningmessaging_profile_idmessaging_profile_namephone_numberphone_number_typepurchased_atrecord_typesource_typestatust38_fax_gateway_enabledtagsupdated_atVerify ownership of phone numbers
验证电话号码所有权
Verifies ownership of the provided phone numbers and returns a mapping of numbers to their IDs, plus a list of numbers not found in the account.
POST /phone_numbers/actions/verify_ownershipphone_numbersjava
import com.telnyx.sdk.models.phonenumbers.actions.ActionVerifyOwnershipParams;
import com.telnyx.sdk.models.phonenumbers.actions.ActionVerifyOwnershipResponse;
ActionVerifyOwnershipParams params = ActionVerifyOwnershipParams.builder()
.addPhoneNumber("+15551234567")
.build();
ActionVerifyOwnershipResponse response = client.phoneNumbers().actions().verifyOwnership(params);Returns: (array[object]), (array[string]), (string)
foundnot_foundrecord_type验证提供的电话号码的所有权,返回号码与其ID的映射,以及账户中不存在的号码列表。
POST /phone_numbers/actions/verify_ownershipphone_numbersjava
import com.telnyx.sdk.models.phonenumbers.actions.ActionVerifyOwnershipParams;
import com.telnyx.sdk.models.phonenumbers.actions.ActionVerifyOwnershipResponse;
ActionVerifyOwnershipParams params = ActionVerifyOwnershipParams.builder()
.addPhoneNumber("+15551234567")
.build();
ActionVerifyOwnershipResponse response = client.phoneNumbers().actions().verifyOwnership(params);返回值:(对象数组)、(字符串数组)、(字符串)
foundnot_foundrecord_typeLists the phone numbers jobs
列出电话号码任务
GET /phone_numbers/jobsjava
import com.telnyx.sdk.models.phonenumbers.jobs.JobListPage;
import com.telnyx.sdk.models.phonenumbers.jobs.JobListParams;
JobListPage page = client.phoneNumbers().jobs().list();Returns: (string), (date-time), (array[object]), (uuid), (array[object]), (array[object]), (string), (enum: pending, in_progress, completed, failed, expired), (array[object]), (enum: update_emergency_settings, delete_phone_numbers, update_phone_numbers), (string)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_atGET /phone_numbers/jobsjava
import com.telnyx.sdk.models.phonenumbers.jobs.JobListPage;
import com.telnyx.sdk.models.phonenumbers.jobs.JobListParams;
JobListPage page = client.phoneNumbers().jobs().list();返回值:(字符串)、(日期时间)、(对象数组)、(uuid)、(对象数组)、(对象数组)、(字符串)、(枚举值:pending、in_progress、completed、failed、expired)、(对象数组)、(枚举值:update_emergency_settings、delete_phone_numbers、update_phone_numbers)、(字符串)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_atDelete a batch of numbers
批量删除号码
Creates a new background job to delete a batch of numbers. At most one thousand numbers can be updated per API call.
POST /phone_numbers/jobs/delete_phone_numbersphone_numbersjava
import com.telnyx.sdk.models.phonenumbers.jobs.JobDeleteBatchParams;
import com.telnyx.sdk.models.phonenumbers.jobs.JobDeleteBatchResponse;
import java.util.List;
JobDeleteBatchParams params = JobDeleteBatchParams.builder()
.phoneNumbers(List.of(
"+19705555098",
"+19715555098",
"32873127836"
))
.build();
JobDeleteBatchResponse response = client.phoneNumbers().jobs().deleteBatch(params);Returns: (string), (date-time), (array[object]), (uuid), (array[object]), (array[object]), (string), (enum: pending, in_progress, completed, failed, expired), (array[object]), (enum: update_emergency_settings, delete_phone_numbers, update_phone_numbers), (string)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_at创建一个新的后台任务来批量删除号码,每次API调用最多可更新1000个号码。
POST /phone_numbers/jobs/delete_phone_numbersphone_numbersjava
import com.telnyx.sdk.models.phonenumbers.jobs.JobDeleteBatchParams;
import com.telnyx.sdk.models.phonenumbers.jobs.JobDeleteBatchResponse;
import java.util.List;
JobDeleteBatchParams params = JobDeleteBatchParams.builder()
.phoneNumbers(List.of(
"+19705555098",
"+19715555098",
"32873127836"
))
.build();
JobDeleteBatchResponse response = client.phoneNumbers().jobs().deleteBatch(params);返回值:(字符串)、(日期时间)、(对象数组)、(uuid)、(对象数组)、(对象数组)、(字符串)、(枚举值:pending、in_progress、completed、failed、expired)、(对象数组)、(枚举值:update_emergency_settings、delete_phone_numbers、update_phone_numbers)、(字符串)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_atUpdate the emergency settings from a batch of numbers
批量更新号码的紧急设置
Creates a background job to update the emergency settings of a collection of phone numbers. At most one thousand numbers can be updated per API call.
POST /phone_numbers/jobs/update_emergency_settingsemergency_enabledphone_numbersOptional: (string | null)
emergency_address_idjava
import com.telnyx.sdk.models.phonenumbers.jobs.JobUpdateEmergencySettingsBatchParams;
import com.telnyx.sdk.models.phonenumbers.jobs.JobUpdateEmergencySettingsBatchResponse;
import java.util.List;
JobUpdateEmergencySettingsBatchParams params = JobUpdateEmergencySettingsBatchParams.builder()
.emergencyEnabled(true)
.phoneNumbers(List.of(
"+19705555098",
"+19715555098",
"32873127836"
))
.build();
JobUpdateEmergencySettingsBatchResponse response = client.phoneNumbers().jobs().updateEmergencySettingsBatch(params);Returns: (string), (date-time), (array[object]), (uuid), (array[object]), (array[object]), (string), (enum: pending, in_progress, completed, failed, expired), (array[object]), (enum: update_emergency_settings, delete_phone_numbers, update_phone_numbers), (string)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_at创建一个后台任务来批量更新一组电话号码的紧急设置,每次API调用最多可更新1000个号码。
POST /phone_numbers/jobs/update_emergency_settingsemergency_enabledphone_numbers可选参数:(字符串 | 空)
emergency_address_idjava
import com.telnyx.sdk.models.phonenumbers.jobs.JobUpdateEmergencySettingsBatchParams;
import com.telnyx.sdk.models.phonenumbers.jobs.JobUpdateEmergencySettingsBatchResponse;
import java.util.List;
JobUpdateEmergencySettingsBatchParams params = JobUpdateEmergencySettingsBatchParams.builder()
.emergencyEnabled(true)
.phoneNumbers(List.of(
"+19705555098",
"+19715555098",
"32873127836"
))
.build();
JobUpdateEmergencySettingsBatchResponse response = client.phoneNumbers().jobs().updateEmergencySettingsBatch(params);返回值:(字符串)、(日期时间)、(对象数组)、(uuid)、(对象数组)、(对象数组)、(字符串)、(枚举值:pending、in_progress、completed、failed、expired)、(对象数组)、(枚举值:update_emergency_settings、delete_phone_numbers、update_phone_numbers)、(字符串)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_atUpdate a batch of numbers
批量更新号码
Creates a new background job to update a batch of numbers. At most one thousand numbers can be updated per API call. At least one of the updateable fields must be submitted.
POST /phone_numbers/jobs/update_phone_numbersphone_numbersOptional: (string), (string), (string), (boolean), (string), (boolean), (array[string]), (object)
billing_group_idconnection_idcustomer_referencedeletion_lock_enabledexternal_pinhd_voice_enabledtagsvoicejava
import com.telnyx.sdk.models.phonenumbers.jobs.JobUpdateBatchParams;
import com.telnyx.sdk.models.phonenumbers.jobs.JobUpdateBatchResponse;
JobUpdateBatchParams params = JobUpdateBatchParams.builder()
.addPhoneNumber("1583466971586889004")
.addPhoneNumber("+13127367254")
.build();
JobUpdateBatchResponse response = client.phoneNumbers().jobs().updateBatch(params);Returns: (string), (date-time), (array[object]), (uuid), (array[object]), (array[object]), (string), (enum: pending, in_progress, completed, failed, expired), (array[object]), (enum: update_emergency_settings, delete_phone_numbers, update_phone_numbers), (string)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_at创建一个新的后台任务来批量更新号码,每次API调用最多可更新1000个号码,必须至少提交一个可更新字段。
POST /phone_numbers/jobs/update_phone_numbersphone_numbers可选参数:(字符串)、(字符串)、(字符串)、(布尔值)、(字符串)、(布尔值)、(字符串数组)、(对象)
billing_group_idconnection_idcustomer_referencedeletion_lock_enabledexternal_pinhd_voice_enabledtagsvoicejava
import com.telnyx.sdk.models.phonenumbers.jobs.JobUpdateBatchParams;
import com.telnyx.sdk.models.phonenumbers.jobs.JobUpdateBatchResponse;
JobUpdateBatchParams params = JobUpdateBatchParams.builder()
.addPhoneNumber("1583466971586889004")
.addPhoneNumber("+13127367254")
.build();
JobUpdateBatchResponse response = client.phoneNumbers().jobs().updateBatch(params);返回值:(字符串)、(日期时间)、(对象数组)、(uuid)、(对象数组)、(对象数组)、(字符串)、(枚举值:pending、in_progress、completed、failed、expired)、(对象数组)、(枚举值:update_emergency_settings、delete_phone_numbers、update_phone_numbers)、(字符串)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_atRetrieve a phone numbers job
查询电话号码任务
GET /phone_numbers/jobs/{id}java
import com.telnyx.sdk.models.phonenumbers.jobs.JobRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.jobs.JobRetrieveResponse;
JobRetrieveResponse job = client.phoneNumbers().jobs().retrieve("550e8400-e29b-41d4-a716-446655440000");Returns: (string), (date-time), (array[object]), (uuid), (array[object]), (array[object]), (string), (enum: pending, in_progress, completed, failed, expired), (array[object]), (enum: update_emergency_settings, delete_phone_numbers, update_phone_numbers), (string)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_atGET /phone_numbers/jobs/{id}java
import com.telnyx.sdk.models.phonenumbers.jobs.JobRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.jobs.JobRetrieveResponse;
JobRetrieveResponse job = client.phoneNumbers().jobs().retrieve("550e8400-e29b-41d4-a716-446655440000");返回值:(字符串)、(日期时间)、(对象数组)、(uuid)、(对象数组)、(对象数组)、(字符串)、(枚举值:pending、in_progress、completed、failed、expired)、(对象数组)、(枚举值:update_emergency_settings、delete_phone_numbers、update_phone_numbers)、(字符串)
created_atetcfailed_operationsidpending_operationsphone_numbersrecord_typestatussuccessful_operationstypeupdated_atList phone numbers with messaging settings
列出带消息配置的电话号码
GET /phone_numbers/messagingjava
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingListPage;
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingListParams;
MessagingListPage page = client.phoneNumbers().messaging().list();Returns: (string), (date-time), (array[string]), (object), (object), (string), (string), (string | null), (string), (string), (enum: messaging_phone_number, messaging_settings), (array[string]), (string), (enum: long-code, toll-free, short-code, longcode, tollfree, shortcode), (date-time)
country_codecreated_ateligible_messaging_productsfeatureshealthidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atGET /phone_numbers/messagingjava
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingListPage;
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingListParams;
MessagingListPage page = client.phoneNumbers().messaging().list();返回值:(字符串)、(日期时间)、(字符串数组)、(对象)、(对象)、(字符串)、(字符串)、(字符串 | 空)、(字符串)、(字符串)、(枚举值:messaging_phone_number、messaging_settings)、(字符串数组)、(字符串)、(枚举值:long-code、toll-free、short-code、longcode、tollfree、shortcode)、(日期时间)
country_codecreated_ateligible_messaging_productsfeatureshealthidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atSlim List phone numbers
精简版电话号码列表
List phone numbers, This endpoint is a lighter version of the /phone_numbers endpoint having higher performance and rate limit.
GET /phone_numbers/slimjava
import com.telnyx.sdk.models.phonenumbers.PhoneNumberSlimListPage;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberSlimListParams;
PhoneNumberSlimListPage page = client.phoneNumbers().slimList();Returns: (string), (boolean), (boolean), (boolean), (boolean), (string), (string), (string), (string), (string), (boolean), (enum: active, deprovisioning, disabled, provisioning, provisioning-failed), (string), (boolean), (string), (enum: disabled, reject_calls, flag_calls), (string), (enum: local, toll_free, mobile, national, shared_cost, landline, tollfree, shortcode, longcode), (string), (string), (enum: purchase-pending, purchase-failed, port-pending, port-failed, active, deleted, emergency-only, ported-out, port-out-pending, requirement-info-pending, requirement-info-under-review, requirement-info-exception, provision-pending), (boolean), (string)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idcountry_iso_alpha2created_atcustomer_referenceemergency_address_idemergency_enabledemergency_statusexternal_pinhd_voice_enabledidinbound_call_screeningphone_numberphone_number_typepurchased_atrecord_typestatust38_fax_gateway_enabledupdated_at列出电话号码,该接口是接口的轻量版本,性能更高、速率限制更宽松。
/phone_numbersGET /phone_numbers/slimjava
import com.telnyx.sdk.models.phonenumbers.PhoneNumberSlimListPage;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberSlimListParams;
PhoneNumberSlimListPage page = client.phoneNumbers().slimList();返回值:(字符串)、(布尔值)、(布尔值)、(布尔值)、(布尔值)、(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(布尔值)、(枚举值:active、deprovisioning、disabled、provisioning、provisioning-failed)、(字符串)、(布尔值)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(字符串)、(枚举值:local、toll_free、mobile、national、shared_cost、landline、tollfree、shortcode、longcode)、(字符串)、(字符串)、(枚举值:purchase-pending、purchase-failed、port-pending、port-failed、active、deleted、emergency-only、ported-out、port-out-pending、requirement-info-pending、requirement-info-under-review、requirement-info-exception、provision-pending)、(布尔值)、(字符串)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idcountry_iso_alpha2created_atcustomer_referenceemergency_address_idemergency_enabledemergency_statusexternal_pinhd_voice_enabledidinbound_call_screeningphone_numberphone_number_typepurchased_atrecord_typestatust38_fax_gateway_enabledupdated_atList phone numbers with voice settings
列出带语音配置的电话号码
GET /phone_numbers/voicejava
import com.telnyx.sdk.models.phonenumbers.voice.VoiceListPage;
import com.telnyx.sdk.models.phonenumbers.voice.VoiceListParams;
VoiceListPage page = client.phoneNumbers().voice().list();Returns: (object), (object), (object), (string), (string), (object), (string), (enum: disabled, reject_calls, flag_calls), (object), (string), (string), (boolean), (string), (enum: pay-per-minute, channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodGET /phone_numbers/voicejava
import com.telnyx.sdk.models.phonenumbers.voice.VoiceListPage;
import com.telnyx.sdk.models.phonenumbers.voice.VoiceListParams;
VoiceListPage page = client.phoneNumbers().voice().list();返回值:(对象)、(对象)、(对象)、(字符串)、(字符串)、(对象)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(对象)、(字符串)、(字符串)、(布尔值)、(字符串)、(枚举值:pay-per-minute、channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodRetrieve a phone number
查询单个电话号码
GET /phone_numbers/{id}java
import com.telnyx.sdk.models.phonenumbers.PhoneNumberRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberRetrieveResponse;
PhoneNumberRetrieveResponse phoneNumber = client.phoneNumbers().retrieve("1293384261075731499");Returns: (string | null), (boolean), (boolean), (boolean), (boolean), (string | null), (string | null), (string), (date-time), (string | null), (boolean), (string | null), (boolean), (enum: active, deprovisioning, disabled, provisioning, provisioning-failed), (string | null), (boolean), (string), (enum: disabled, reject_calls, flag_calls), (string | null), (string | null), (string), (enum: local, toll_free, mobile, national, shared_cost, landline, tollfree, shortcode, longcode), (string), (string), (object), (enum: purchase-pending, purchase-failed, port-pending, port-failed, active, deleted, emergency-only, ported-out, port-out-pending, requirement-info-pending, requirement-info-under-review, requirement-info-exception, provision-pending), (boolean), (array[string]), (string)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idconnection_namecountry_iso_alpha2created_atcustomer_referencedeletion_lock_enabledemergency_address_idemergency_enabledemergency_statusexternal_pinhd_voice_enabledidinbound_call_screeningmessaging_profile_idmessaging_profile_namephone_numberphone_number_typepurchased_atrecord_typesource_typestatust38_fax_gateway_enabledtagsupdated_atGET /phone_numbers/{id}java
import com.telnyx.sdk.models.phonenumbers.PhoneNumberRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberRetrieveResponse;
PhoneNumberRetrieveResponse phoneNumber = client.phoneNumbers().retrieve("1293384261075731499");返回值:(字符串 | 空)、(布尔值)、(布尔值)、(布尔值)、(布尔值)、(字符串 | 空)、(字符串 | 空)、(字符串)、(日期时间)、(字符串 | 空)、(布尔值)、(字符串 | 空)、(布尔值)、(枚举值:active、deprovisioning、disabled、provisioning、provisioning-failed)、(字符串 | 空)、(布尔值)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(字符串 | 空)、(字符串 | 空)、(字符串)、(枚举值:local、toll_free、mobile、national、shared_cost、landline、tollfree、shortcode、longcode)、(字符串)、(字符串)、(对象)、(枚举值:purchase-pending、purchase-failed、port-pending、port-failed、active、deleted、emergency-only、ported-out、port-out-pending、requirement-info-pending、requirement-info-under-review、requirement-info-exception、provision-pending)、(布尔值)、(字符串数组)、(字符串)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idconnection_namecountry_iso_alpha2created_atcustomer_referencedeletion_lock_enabledemergency_address_idemergency_enabledemergency_statusexternal_pinhd_voice_enabledidinbound_call_screeningmessaging_profile_idmessaging_profile_namephone_numberphone_number_typepurchased_atrecord_typesource_typestatust38_fax_gateway_enabledtagsupdated_atUpdate a phone number
更新单个电话号码
PATCH /phone_numbers/{id}Optional: (string), (string), (string), (string), (string), (boolean), (string), (array[string])
address_idbilling_group_idconnection_idcustomer_referenceexternal_pinhd_voice_enabledidtagsjava
import com.telnyx.sdk.models.phonenumbers.PhoneNumberUpdateParams;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberUpdateResponse;
PhoneNumberUpdateResponse phoneNumber = client.phoneNumbers().update("1293384261075731499");Returns: (string | null), (boolean), (boolean), (boolean), (boolean), (string | null), (string | null), (string), (date-time), (string | null), (boolean), (string | null), (boolean), (enum: active, deprovisioning, disabled, provisioning, provisioning-failed), (string | null), (boolean), (string), (enum: disabled, reject_calls, flag_calls), (string | null), (string | null), (string), (enum: local, toll_free, mobile, national, shared_cost, landline, tollfree, shortcode, longcode), (string), (string), (object), (enum: purchase-pending, purchase-failed, port-pending, port-failed, active, deleted, emergency-only, ported-out, port-out-pending, requirement-info-pending, requirement-info-under-review, requirement-info-exception, provision-pending), (boolean), (array[string]), (string)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idconnection_namecountry_iso_alpha2created_atcustomer_referencedeletion_lock_enabledemergency_address_idemergency_enabledemergency_statusexternal_pinhd_voice_enabledidinbound_call_screeningmessaging_profile_idmessaging_profile_namephone_numberphone_number_typepurchased_atrecord_typesource_typestatust38_fax_gateway_enabledtagsupdated_atPATCH /phone_numbers/{id}可选参数:(字符串)、(字符串)、(字符串)、(字符串)、(字符串)、(布尔值)、(字符串)、(字符串数组)
address_idbilling_group_idconnection_idcustomer_referenceexternal_pinhd_voice_enabledidtagsjava
import com.telnyx.sdk.models.phonenumbers.PhoneNumberUpdateParams;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberUpdateResponse;
PhoneNumberUpdateResponse phoneNumber = client.phoneNumbers().update("1293384261075731499");返回值:(字符串 | 空)、(布尔值)、(布尔值)、(布尔值)、(布尔值)、(字符串 | 空)、(字符串 | 空)、(字符串)、(日期时间)、(字符串 | 空)、(布尔值)、(字符串 | 空)、(布尔值)、(枚举值:active、deprovisioning、disabled、provisioning、provisioning-failed)、(字符串 | 空)、(布尔值)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(字符串 | 空)、(字符串 | 空)、(字符串)、(枚举值:local、toll_free、mobile、national、shared_cost、landline、tollfree、shortcode、longcode)、(字符串)、(字符串)、(对象)、(枚举值:purchase-pending、purchase-failed、port-pending、port-failed、active、deleted、emergency-only、ported-out、port-out-pending、requirement-info-pending、requirement-info-under-review、requirement-info-exception、provision-pending)、(布尔值)、(字符串数组)、(字符串)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idconnection_namecountry_iso_alpha2created_atcustomer_referencedeletion_lock_enabledemergency_address_idemergency_enabledemergency_statusexternal_pinhd_voice_enabledidinbound_call_screeningmessaging_profile_idmessaging_profile_namephone_numberphone_number_typepurchased_atrecord_typesource_typestatust38_fax_gateway_enabledtagsupdated_atDelete a phone number
删除单个电话号码
DELETE /phone_numbers/{id}java
import com.telnyx.sdk.models.phonenumbers.PhoneNumberDeleteParams;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberDeleteResponse;
PhoneNumberDeleteResponse phoneNumber = client.phoneNumbers().delete("1293384261075731499");Returns: (string), (boolean), (boolean), (boolean), (boolean), (string), (string), (string), (string), (boolean), (string), (boolean), (string), (boolean), (string), (string), (string), (string), (enum: local, toll_free, mobile, national, shared_cost, landline), (string), (string), (enum: purchase-pending, purchase-failed, port-pending, port-failed, active, deleted, emergency-only, ported-out, port-out-pending), (boolean), (array[string]), (string)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idconnection_namecreated_atcustomer_referencedeletion_lock_enabledemergency_address_idemergency_enabledexternal_pinhd_voice_enabledidmessaging_profile_idmessaging_profile_namephone_numberphone_number_typepurchased_atrecord_typestatust38_fax_gateway_enabledtagsupdated_atDELETE /phone_numbers/{id}java
import com.telnyx.sdk.models.phonenumbers.PhoneNumberDeleteParams;
import com.telnyx.sdk.models.phonenumbers.PhoneNumberDeleteResponse;
PhoneNumberDeleteResponse phoneNumber = client.phoneNumbers().delete("1293384261075731499");返回值:(字符串)、(布尔值)、(布尔值)、(布尔值)、(布尔值)、(字符串)、(字符串)、(字符串)、(字符串)、(布尔值)、(字符串)、(布尔值)、(字符串)、(布尔值)、(字符串)、(字符串)、(字符串)、(字符串)、(枚举值:local、toll_free、mobile、national、shared_cost、landline)、(字符串)、(字符串)、(枚举值:purchase-pending、purchase-failed、port-pending、port-failed、active、deleted、emergency-only、ported-out、port-out-pending)、(布尔值)、(字符串数组)、(字符串)
billing_group_idcall_forwarding_enabledcall_recording_enabledcaller_id_name_enabledcnam_listing_enabledconnection_idconnection_namecreated_atcustomer_referencedeletion_lock_enabledemergency_address_idemergency_enabledexternal_pinhd_voice_enabledidmessaging_profile_idmessaging_profile_namephone_numberphone_number_typepurchased_atrecord_typestatust38_fax_gateway_enabledtagsupdated_atChange the bundle status for a phone number (set to being in a bundle or remove from a bundle)
修改电话号码的捆绑包状态(设置为加入捆绑包或从捆绑包中移除)
PATCH /phone_numbers/{id}/actions/bundle_status_changebundle_idjava
import com.telnyx.sdk.models.phonenumbers.actions.ActionChangeBundleStatusParams;
import com.telnyx.sdk.models.phonenumbers.actions.ActionChangeBundleStatusResponse;
ActionChangeBundleStatusParams params = ActionChangeBundleStatusParams.builder()
.id("1293384261075731499")
.bundleId("5194d8fc-87e6-4188-baa9-1c434bbe861b")
.build();
ActionChangeBundleStatusResponse response = client.phoneNumbers().actions().changeBundleStatus(params);Returns: (object), (object), (object), (string), (string), (object), (string), (enum: disabled, reject_calls, flag_calls), (object), (string), (string), (boolean), (string), (enum: pay-per-minute, channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodPATCH /phone_numbers/{id}/actions/bundle_status_changebundle_idjava
import com.telnyx.sdk.models.phonenumbers.actions.ActionChangeBundleStatusParams;
import com.telnyx.sdk.models.phonenumbers.actions.ActionChangeBundleStatusResponse;
ActionChangeBundleStatusParams params = ActionChangeBundleStatusParams.builder()
.id("1293384261075731499")
.bundleId("5194d8fc-87e6-4188-baa9-1c434bbe861b")
.build();
ActionChangeBundleStatusResponse response = client.phoneNumbers().actions().changeBundleStatus(params);返回值:(对象)、(对象)、(对象)、(字符串)、(字符串)、(对象)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(对象)、(字符串)、(字符串)、(布尔值)、(字符串)、(枚举值:pay-per-minute、channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodEnable emergency for a phone number
为电话号码启用紧急服务
POST /phone_numbers/{id}/actions/enable_emergencyemergency_enabledemergency_address_idjava
import com.telnyx.sdk.models.phonenumbers.actions.ActionEnableEmergencyParams;
import com.telnyx.sdk.models.phonenumbers.actions.ActionEnableEmergencyResponse;
ActionEnableEmergencyParams params = ActionEnableEmergencyParams.builder()
.id("1293384261075731499")
.emergencyAddressId("53829456729313")
.emergencyEnabled(true)
.build();
ActionEnableEmergencyResponse response = client.phoneNumbers().actions().enableEmergency(params);Returns: (object), (object), (object), (string), (string), (object), (string), (enum: disabled, reject_calls, flag_calls), (object), (string), (string), (boolean), (string), (enum: pay-per-minute, channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodPOST /phone_numbers/{id}/actions/enable_emergencyemergency_enabledemergency_address_idjava
import com.telnyx.sdk.models.phonenumbers.actions.ActionEnableEmergencyParams;
import com.telnyx.sdk.models.phonenumbers.actions.ActionEnableEmergencyResponse;
ActionEnableEmergencyParams params = ActionEnableEmergencyParams.builder()
.id("1293384261075731499")
.emergencyAddressId("53829456729313")
.emergencyEnabled(true)
.build();
ActionEnableEmergencyResponse response = client.phoneNumbers().actions().enableEmergency(params);返回值:(对象)、(对象)、(对象)、(字符串)、(字符串)、(对象)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(对象)、(字符串)、(字符串)、(布尔值)、(字符串)、(枚举值:pay-per-minute、channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodRetrieve a phone number with messaging settings
查询单个带消息配置的电话号码
GET /phone_numbers/{id}/messagingjava
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingRetrieveResponse;
MessagingRetrieveResponse messaging = client.phoneNumbers().messaging().retrieve("550e8400-e29b-41d4-a716-446655440000");Returns: (string), (date-time), (array[string]), (object), (object), (string), (string), (string | null), (string), (string), (enum: messaging_phone_number, messaging_settings), (array[string]), (string), (enum: long-code, toll-free, short-code, longcode, tollfree, shortcode), (date-time)
country_codecreated_ateligible_messaging_productsfeatureshealthidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atGET /phone_numbers/{id}/messagingjava
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingRetrieveResponse;
MessagingRetrieveResponse messaging = client.phoneNumbers().messaging().retrieve("550e8400-e29b-41d4-a716-446655440000");返回值:(字符串)、(日期时间)、(字符串数组)、(对象)、(对象)、(字符串)、(字符串)、(字符串 | 空)、(字符串)、(字符串)、(枚举值:messaging_phone_number、messaging_settings)、(字符串数组)、(字符串)、(枚举值:long-code、toll-free、short-code、longcode、tollfree、shortcode)、(日期时间)
country_codecreated_ateligible_messaging_productsfeatureshealthidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atUpdate the messaging profile and/or messaging product of a phone number
更新电话号码的消息配置文件和/或消息产品
PATCH /phone_numbers/{id}/messagingOptional: (string), (string), (array[string])
messaging_productmessaging_profile_idtagsjava
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingUpdateParams;
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingUpdateResponse;
MessagingUpdateResponse messaging = client.phoneNumbers().messaging().update("550e8400-e29b-41d4-a716-446655440000");Returns: (string), (date-time), (array[string]), (object), (object), (string), (string), (string | null), (string), (string), (enum: messaging_phone_number, messaging_settings), (array[string]), (string), (enum: long-code, toll-free, short-code, longcode, tollfree, shortcode), (date-time)
country_codecreated_ateligible_messaging_productsfeatureshealthidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atPATCH /phone_numbers/{id}/messaging可选参数:(字符串)、(字符串)、(字符串数组)
messaging_productmessaging_profile_idtagsjava
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingUpdateParams;
import com.telnyx.sdk.models.phonenumbers.messaging.MessagingUpdateResponse;
MessagingUpdateResponse messaging = client.phoneNumbers().messaging().update("550e8400-e29b-41d4-a716-446655440000");返回值:(字符串)、(日期时间)、(字符串数组)、(对象)、(对象)、(字符串)、(字符串)、(字符串 | 空)、(字符串)、(字符串)、(枚举值:messaging_phone_number、messaging_settings)、(字符串数组)、(字符串)、(枚举值:long-code、toll-free、short-code、longcode、tollfree、shortcode)、(日期时间)
country_codecreated_ateligible_messaging_productsfeatureshealthidmessaging_productmessaging_profile_idorganization_idphone_numberrecord_typetagstraffic_typetypeupdated_atRetrieve a phone number with voice settings
查询单个带语音配置的电话号码
GET /phone_numbers/{id}/voicejava
import com.telnyx.sdk.models.phonenumbers.voice.VoiceRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.voice.VoiceRetrieveResponse;
VoiceRetrieveResponse voice = client.phoneNumbers().voice().retrieve("1293384261075731499");Returns: (object), (object), (object), (string), (string), (object), (string), (enum: disabled, reject_calls, flag_calls), (object), (string), (string), (boolean), (string), (enum: pay-per-minute, channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodGET /phone_numbers/{id}/voicejava
import com.telnyx.sdk.models.phonenumbers.voice.VoiceRetrieveParams;
import com.telnyx.sdk.models.phonenumbers.voice.VoiceRetrieveResponse;
VoiceRetrieveResponse voice = client.phoneNumbers().voice().retrieve("1293384261075731499");返回值:(对象)、(对象)、(对象)、(字符串)、(字符串)、(对象)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(对象)、(字符串)、(字符串)、(布尔值)、(字符串)、(枚举值:pay-per-minute、channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodUpdate a phone number with voice settings
更新电话号码的语音配置
PATCH /phone_numbers/{id}/voiceOptional: (object), (object), (boolean), (object), (enum: disabled, reject_calls, flag_calls), (object), (boolean), (string), (enum: pay-per-minute, channel)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listinginbound_call_screeningmedia_featurestech_prefix_enabledtranslated_numberusage_payment_methodjava
import com.telnyx.sdk.models.phonenumbers.voice.UpdateVoiceSettings;
import com.telnyx.sdk.models.phonenumbers.voice.VoiceUpdateParams;
import com.telnyx.sdk.models.phonenumbers.voice.VoiceUpdateResponse;
VoiceUpdateParams params = VoiceUpdateParams.builder()
.id("1293384261075731499")
.updateVoiceSettings(UpdateVoiceSettings.builder().build())
.build();
VoiceUpdateResponse voice = client.phoneNumbers().voice().update(params);Returns: (object), (object), (object), (string), (string), (object), (string), (enum: disabled, reject_calls, flag_calls), (object), (string), (string), (boolean), (string), (enum: pay-per-minute, channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodPATCH /phone_numbers/{id}/voice可选参数:(对象)、(对象)、(布尔值)、(对象)、(枚举值:disabled、reject_calls、flag_calls)、(对象)、(布尔值)、(字符串)、(枚举值:pay-per-minute、channel)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listinginbound_call_screeningmedia_featurestech_prefix_enabledtranslated_numberusage_payment_methodjava
import com.telnyx.sdk.models.phonenumbers.voice.UpdateVoiceSettings;
import com.telnyx.sdk.models.phonenumbers.voice.VoiceUpdateParams;
import com.telnyx.sdk.models.phonenumbers.voice.VoiceUpdateResponse;
VoiceUpdateParams params = VoiceUpdateParams.builder()
.id("1293384261075731499")
.updateVoiceSettings(UpdateVoiceSettings.builder().build())
.build();
VoiceUpdateResponse voice = client.phoneNumbers().voice().update(params);返回值:(对象)、(对象)、(对象)、(字符串)、(字符串)、(对象)、(字符串)、(枚举值:disabled、reject_calls、flag_calls)、(对象)、(字符串)、(字符串)、(布尔值)、(字符串)、(枚举值:pay-per-minute、channel)
call_forwardingcall_recordingcnam_listingconnection_idcustomer_referenceemergencyidinbound_call_screeningmedia_featuresphone_numberrecord_typetech_prefix_enabledtranslated_numberusage_payment_methodList Mobile Phone Numbers
列出移动电话号码
GET /v2/mobile_phone_numbersjava
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberListPage;
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberListParams;
MobilePhoneNumberListPage page = client.mobilePhoneNumbers().list();Returns: (object), (object), (boolean), (object), (string | null), (string | null), (string | null), (string), (date-time), (string | null), (string), (object), (enum: disabled, reject_calls, flag_calls), (boolean), (enum: inbound, outbound, both, disabled), (object), (string), (string), (uuid), (string), (array[string]), (date-time)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listingconnection_idconnection_nameconnection_typecountry_iso_alpha2created_atcustomer_referenceidinboundinbound_call_screeningmobile_voice_enablednoise_suppressionoutboundphone_numberrecord_typesim_card_idstatustagsupdated_atGET /v2/mobile_phone_numbersjava
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberListPage;
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberListParams;
MobilePhoneNumberListPage page = client.mobilePhoneNumbers().list();返回值:(对象)、(对象)、(布尔值)、(对象)、(字符串 | 空)、(字符串 | 空)、(字符串 | 空)、(字符串)、(日期时间)、(字符串 | 空)、(字符串)、(对象)、(枚举值:disabled、reject_calls、flag_calls)、(布尔值)、(枚举值:inbound、outbound、both、disabled)、(对象)、(字符串)、(字符串)、(uuid)、(字符串)、(字符串数组)、(日期时间)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listingconnection_idconnection_nameconnection_typecountry_iso_alpha2created_atcustomer_referenceidinboundinbound_call_screeningmobile_voice_enablednoise_suppressionoutboundphone_numberrecord_typesim_card_idstatustagsupdated_atRetrieve a Mobile Phone Number
查询单个移动电话号码
GET /v2/mobile_phone_numbers/{id}java
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberRetrieveParams;
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberRetrieveResponse;
MobilePhoneNumberRetrieveResponse mobilePhoneNumber = client.mobilePhoneNumbers().retrieve("550e8400-e29b-41d4-a716-446655440000");Returns: (object), (object), (boolean), (object), (string | null), (string | null), (string | null), (string), (date-time), (string | null), (string), (object), (enum: disabled, reject_calls, flag_calls), (boolean), (enum: inbound, outbound, both, disabled), (object), (string), (string), (uuid), (string), (array[string]), (date-time)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listingconnection_idconnection_nameconnection_typecountry_iso_alpha2created_atcustomer_referenceidinboundinbound_call_screeningmobile_voice_enablednoise_suppressionoutboundphone_numberrecord_typesim_card_idstatustagsupdated_atGET /v2/mobile_phone_numbers/{id}java
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberRetrieveParams;
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberRetrieveResponse;
MobilePhoneNumberRetrieveResponse mobilePhoneNumber = client.mobilePhoneNumbers().retrieve("550e8400-e29b-41d4-a716-446655440000");返回值:(对象)、(对象)、(布尔值)、(对象)、(字符串 | 空)、(字符串 | 空)、(字符串 | 空)、(字符串)、(日期时间)、(字符串 | 空)、(字符串)、(对象)、(枚举值:disabled、reject_calls、flag_calls)、(布尔值)、(枚举值:inbound、outbound、both、disabled)、(对象)、(字符串)、(字符串)、(uuid)、(字符串)、(字符串数组)、(日期时间)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listingconnection_idconnection_nameconnection_typecountry_iso_alpha2created_atcustomer_referenceidinboundinbound_call_screeningmobile_voice_enablednoise_suppressionoutboundphone_numberrecord_typesim_card_idstatustagsupdated_atUpdate a Mobile Phone Number
更新移动电话号码
PATCH /v2/mobile_phone_numbers/{id}Optional: (object), (object), (boolean), (object), (string | null), (string | null), (object), (enum: disabled, reject_calls, flag_calls), (boolean), (object), (array[string])
call_forwardingcall_recordingcaller_id_name_enabledcnam_listingconnection_idcustomer_referenceinboundinbound_call_screeningnoise_suppressionoutboundtagsjava
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberUpdateParams;
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberUpdateResponse;
MobilePhoneNumberUpdateResponse mobilePhoneNumber = client.mobilePhoneNumbers().update("550e8400-e29b-41d4-a716-446655440000");Returns: (object), (object), (boolean), (object), (string | null), (string | null), (string | null), (string), (date-time), (string | null), (string), (object), (enum: disabled, reject_calls, flag_calls), (boolean), (enum: inbound, outbound, both, disabled), (object), (string), (string), (uuid), (string), (array[string]), (date-time)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listingconnection_idconnection_nameconnection_typecountry_iso_alpha2created_atcustomer_referenceidinboundinbound_call_screeningmobile_voice_enablednoise_suppressionoutboundphone_numberrecord_typesim_card_idstatustagsupdated_atPATCH /v2/mobile_phone_numbers/{id}可选参数:(对象)、(对象)、(布尔值)、(对象)、(字符串 | 空)、(字符串 | 空)、(对象)、(枚举值:disabled、reject_calls、flag_calls)、(布尔值)、(对象)、(字符串数组)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listingconnection_idcustomer_referenceinboundinbound_call_screeningnoise_suppressionoutboundtagsjava
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberUpdateParams;
import com.telnyx.sdk.models.mobilephonenumbers.MobilePhoneNumberUpdateResponse;
MobilePhoneNumberUpdateResponse mobilePhoneNumber = client.mobilePhoneNumbers().update("550e8400-e29b-41d4-a716-446655440000");返回值:(对象)、(对象)、(布尔值)、(对象)、(字符串 | 空)、(字符串 | 空)、(字符串 | 空)、(字符串)、(日期时间)、(字符串 | 空)、(字符串)、(对象)、(枚举值:disabled、reject_calls、flag_calls)、(布尔值)、(枚举值:inbound、outbound、both、disabled)、(对象)、(字符串)、(字符串)、(uuid)、(字符串)、(字符串数组)、(日期时间)
call_forwardingcall_recordingcaller_id_name_enabledcnam_listingconnection_idconnection_nameconnection_typecountry_iso_alpha2created_atcustomer_referenceidinboundinbound_call_screeningmobile_voice_enablednoise_suppressionoutboundphone_numberrecord_typesim_card_idstatustagsupdated_at