All URIs are relative to https://api.telnyx.com/v2
Method | HTTP request | Description |
---|---|---|
deleteVerificationRequest | DELETE /messaging_tollfree/verification/requests/{id} | Delete Verification Request |
getVerificationRequest | GET /messaging_tollfree/verification/requests/{id} | Get Verification Request |
listVerificationRequests | GET /messaging_tollfree/verification/requests | List Verification Requests |
submitVerificationRequest | POST /messaging_tollfree/verification/requests | Submit Verification Request |
updateVerificationRequest | PATCH /messaging_tollfree/verification/requests/{id} | Update Verification Request |
Object deleteVerificationRequest(id)
Delete Verification Request
Delete a verification request
A request may only be deleted when when the request is in the "rejected" state.
HTTP 200
: request successfully deletedHTTP 400
: request exists but can't be deleted (i.e. not rejected)HTTP 404
: request unknown or already deleted
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.MessagingTollfreeVerificationApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
MessagingTollfreeVerificationApi apiInstance = new MessagingTollfreeVerificationApi(defaultClient);
UUID id = UUID.randomUUID(); // UUID |
try {
Object result = apiInstance.deleteVerificationRequest(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessagingTollfreeVerificationApi#deleteVerificationRequest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID |
Object
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
0 | Unexpected error | - |
VerificationRequestStatus getVerificationRequest(id)
Get Verification Request
Get a single verification request by its ID.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.MessagingTollfreeVerificationApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
MessagingTollfreeVerificationApi apiInstance = new MessagingTollfreeVerificationApi(defaultClient);
UUID id = UUID.randomUUID(); // UUID |
try {
VerificationRequestStatus result = apiInstance.getVerificationRequest(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessagingTollfreeVerificationApi#getVerificationRequest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
0 | Unexpected error | - |
PaginatedVerificationRequestStatus listVerificationRequests(page, pageSize, dateStart, dateEnd, status, phoneNumber)
List Verification Requests
Get a list of previously-submitted tollfree verification requests
import java.time.OffsetDateTime;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.MessagingTollfreeVerificationApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
MessagingTollfreeVerificationApi apiInstance = new MessagingTollfreeVerificationApi(defaultClient);
Integer page = 56; // Integer |
Integer pageSize = 56; // Integer | Request this many records per page This value is automatically clamped if the provided value is too large.
OffsetDateTime dateStart = OffsetDateTime.now(); // OffsetDateTime |
OffsetDateTime dateEnd = OffsetDateTime.now(); // OffsetDateTime |
TFVerificationStatus status = TFVerificationStatus.fromValue("Verified"); // TFVerificationStatus |
String phoneNumber = "phoneNumber_example"; // String |
try {
PaginatedVerificationRequestStatus result = apiInstance.listVerificationRequests(page, pageSize, dateStart, dateEnd, status, phoneNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessagingTollfreeVerificationApi#listVerificationRequests");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
page | Integer | ||
pageSize | Integer | Request this many records per page This value is automatically clamped if the provided value is too large. | |
dateStart | OffsetDateTime | [optional] | |
dateEnd | OffsetDateTime | [optional] | |
status | TFVerificationStatus | [optional] [enum: Verified, Rejected, Waiting For Vendor, Waiting For Customer, In Progress] | |
phoneNumber | String | [optional] |
PaginatedVerificationRequestStatus
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
0 | Unexpected error | - |
VerificationRequestEgress submitVerificationRequest(tfVerificationRequest)
Submit Verification Request
Submit a new tollfree verification request
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.MessagingTollfreeVerificationApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
MessagingTollfreeVerificationApi apiInstance = new MessagingTollfreeVerificationApi(defaultClient);
TFVerificationRequest tfVerificationRequest = new TFVerificationRequest(); // TFVerificationRequest |
try {
VerificationRequestEgress result = apiInstance.submitVerificationRequest(tfVerificationRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessagingTollfreeVerificationApi#submitVerificationRequest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
tfVerificationRequest | TFVerificationRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
0 | Unexpected error | - |
VerificationRequestEgress updateVerificationRequest(id, tfVerificationRequest)
Update Verification Request
Update an existing tollfree verification request. This is particularly useful when there are pending customer actions to be taken.
import java.util.UUID;
// Import classes:
import com.telnyx.sdk.ApiClient;
import com.telnyx.sdk.ApiException;
import com.telnyx.sdk.Configuration;
import com.telnyx.sdk.auth.*;
import com.telnyx.sdk.model.*;
import com.telnyx.sdk.api.MessagingTollfreeVerificationApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.telnyx.com/v2");
// Configure HTTP bearer authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setBearerToken("BEARER TOKEN");
MessagingTollfreeVerificationApi apiInstance = new MessagingTollfreeVerificationApi(defaultClient);
UUID id = UUID.randomUUID(); // UUID |
TFVerificationRequest tfVerificationRequest = new TFVerificationRequest(); // TFVerificationRequest |
try {
VerificationRequestEgress result = apiInstance.updateVerificationRequest(id, tfVerificationRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessagingTollfreeVerificationApi#updateVerificationRequest");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
id | UUID | ||
tfVerificationRequest | TFVerificationRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
0 | Unexpected error | - |