All URIs are relative to https://restapi.fax.plus/v1
Method | HTTP request | Description |
---|---|---|
getNumber | GET /accounts/self/numbers/{number} | Get number information |
listNumbers | GET /accounts/self/numbers | Get your numbers |
revokeNumber | DELETE /accounts/self/numbers/{number} | Revoke number |
updateNumber | PUT /accounts/self/numbers/{number} | Assign number |
\faxplus\model\Number getNumber($number)
Get number information
Get info of a single number
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: fax_oauth
$config = faxplus\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new faxplus\Api\NumbersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$number = "number_example"; // string |
try {
$result = $apiInstance->getNumber($number);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NumbersApi->getNumber: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
number | string |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\faxplus\model\ResponseNumberList listNumbers()
Get your numbers
List all your purchased numbers
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: fax_oauth
$config = faxplus\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new faxplus\Api\NumbersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->listNumbers();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling NumbersApi->listNumbers: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\faxplus\model\ResponseNumberList
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
revokeNumber($number)
Revoke number
Revoke a specific number from your corporate member
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: fax_oauth
$config = faxplus\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new faxplus\Api\NumbersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$number = "number_example"; // string |
try {
$apiInstance->revokeNumber($number);
} catch (Exception $e) {
echo 'Exception when calling NumbersApi->revokeNumber: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
number | string |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateNumber($number, $payload_number_modification)
Assign number
With this API call you will be able to assign a specific number to a specific account (one of your members).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: fax_oauth
$config = faxplus\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new faxplus\Api\NumbersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$number = "number_example"; // string |
$payload_number_modification = new \faxplus\model\PayloadNumberModification(); // \faxplus\model\PayloadNumberModification |
try {
$apiInstance->updateNumber($number, $payload_number_modification);
} catch (Exception $e) {
echo 'Exception when calling NumbersApi->updateNumber: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
number | string | ||
payload_number_modification | \faxplus\model\PayloadNumberModification |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]