const axios = require('axios');
const AccountsApiFp = require('@alohi/faxplus-api').AccountsApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function updateUser() {
const reqParams = {
"userId": '473e1eb6',
"payloadAccountModification": {
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "sample@fax.plus",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"sample@fax.plus"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"push_notifications": {
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"sms": {
"low_credit": true,
"new_feature": true,
"numbers": [
"+16699990000"
],
"receive_fax": true,
"send_fax": true,
"voicemail": true
}
}
},
"phone": "+16699990000",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
}
const req = await AccountsApiFp(config).updateUser(reqParams);
const resp = await req(axios);
}
updateUser()
from faxplus import ApiClient, AccountsApi, \
AccountData, \
AccountNotificationsBlacklist, \
AccountNotificationsEmailSettings, \
AccountNotificationsPushSettings, \
AccountNotificationsSlackSettings, \
AccountNotificationsSmsSettings, \
AccountNotificationsSettings, \
AccountNotifications, \
RetryOptions, \
AccountSettings, \
PayloadAccountModification
from faxplus.configuration import Configuration
account_data = AccountData(default_file_type='pdf',
save_history=True)
account_notifications_blacklist = AccountNotificationsBlacklist(uids=[])
account_notifications_email_settings = AccountNotificationsEmailSettings(addresses=['sample@fax.plus'],
attachments=dict(),
low_credit=True,
new_feature=True,
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_push_settings = AccountNotificationsPushSettings(low_credit=True,
new_feature=True,
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_slack_settings = AccountNotificationsSlackSettings()
account_notifications_sms_settings = AccountNotificationsSmsSettings(low_credit=True,
new_feature=True,
numbers=['+16699990000'],
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_settings = AccountNotificationsSettings(email=account_notifications_email_settings,
language='en',
push_notifications=account_notifications_push_settings,
slack=account_notifications_slack_settings,
sms=account_notifications_sms_settings)
account_notifications = AccountNotifications(black_list=account_notifications_blacklist,
settings=account_notifications_settings)
retry_options = RetryOptions(count=0,
delay=0)
account_settings = AccountSettings(caller_id_name='Fax.Plus',
options=None,
send_fax=dict(retry=retry_options))
payload_account_modification = PayloadAccountModification(account_data=account_data,
email='sample@fax.plus',
lastname='Smith',
name='John',
notifications=account_notifications,
phone='+16699990000',
settings=account_settings)
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = AccountsApi(api_client)
api.update_user(
user_id='473e1eb6',
body=payload_account_modification
)
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'473e1eb6'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}");
String jsonBody = ...; // See request body example
String result = Request
.Put(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
.addHeader("Content-Type", "'application/json'")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.bodyString(jsonBody, "application/json")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR_CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://restapi.fax.plus/v3/accounts/{user_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
// The x-fax-clientid header is required only when using the OAuth2 token scheme
'x-fax-clientid' => '{client ID}',
);
$client = new GuzzleHttp\Client();
// Define array of request body.
$request_body = ...; // See request body example
try {
$response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X PUT https://restapi.fax.plus/v3/accounts/{user_id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: "YOUR_CLIENT_ID"'
body:
{
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "sample@fax.plus",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"sample@fax.plus"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"push_notifications": {
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"sms": {
"low_credit": true,
"new_feature": true,
"numbers": [
"+16699990000"
],
"receive_fax": true,
"send_fax": true,
"voicemail": true
}
}
},
"phone": "+16699990000",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}Accounts
Modify account information
Modify personal information of your own account or your corporate member’s account. user_id can be either self, or a subordinate’s user_id. (Permitted scopes: fax:all:edit, fax:member:edit, fax:user:edit)
PUT
/
accounts
/
{user_id}
const axios = require('axios');
const AccountsApiFp = require('@alohi/faxplus-api').AccountsApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function updateUser() {
const reqParams = {
"userId": '473e1eb6',
"payloadAccountModification": {
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "sample@fax.plus",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"sample@fax.plus"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"push_notifications": {
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"sms": {
"low_credit": true,
"new_feature": true,
"numbers": [
"+16699990000"
],
"receive_fax": true,
"send_fax": true,
"voicemail": true
}
}
},
"phone": "+16699990000",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
}
const req = await AccountsApiFp(config).updateUser(reqParams);
const resp = await req(axios);
}
updateUser()
from faxplus import ApiClient, AccountsApi, \
AccountData, \
AccountNotificationsBlacklist, \
AccountNotificationsEmailSettings, \
AccountNotificationsPushSettings, \
AccountNotificationsSlackSettings, \
AccountNotificationsSmsSettings, \
AccountNotificationsSettings, \
AccountNotifications, \
RetryOptions, \
AccountSettings, \
PayloadAccountModification
from faxplus.configuration import Configuration
account_data = AccountData(default_file_type='pdf',
save_history=True)
account_notifications_blacklist = AccountNotificationsBlacklist(uids=[])
account_notifications_email_settings = AccountNotificationsEmailSettings(addresses=['sample@fax.plus'],
attachments=dict(),
low_credit=True,
new_feature=True,
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_push_settings = AccountNotificationsPushSettings(low_credit=True,
new_feature=True,
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_slack_settings = AccountNotificationsSlackSettings()
account_notifications_sms_settings = AccountNotificationsSmsSettings(low_credit=True,
new_feature=True,
numbers=['+16699990000'],
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_settings = AccountNotificationsSettings(email=account_notifications_email_settings,
language='en',
push_notifications=account_notifications_push_settings,
slack=account_notifications_slack_settings,
sms=account_notifications_sms_settings)
account_notifications = AccountNotifications(black_list=account_notifications_blacklist,
settings=account_notifications_settings)
retry_options = RetryOptions(count=0,
delay=0)
account_settings = AccountSettings(caller_id_name='Fax.Plus',
options=None,
send_fax=dict(retry=retry_options))
payload_account_modification = PayloadAccountModification(account_data=account_data,
email='sample@fax.plus',
lastname='Smith',
name='John',
notifications=account_notifications,
phone='+16699990000',
settings=account_settings)
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = AccountsApi(api_client)
api.update_user(
user_id='473e1eb6',
body=payload_account_modification
)
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'473e1eb6'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}");
String jsonBody = ...; // See request body example
String result = Request
.Put(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
.addHeader("Content-Type", "'application/json'")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.bodyString(jsonBody, "application/json")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR_CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://restapi.fax.plus/v3/accounts/{user_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
// The x-fax-clientid header is required only when using the OAuth2 token scheme
'x-fax-clientid' => '{client ID}',
);
$client = new GuzzleHttp\Client();
// Define array of request body.
$request_body = ...; // See request body example
try {
$response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X PUT https://restapi.fax.plus/v3/accounts/{user_id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: "YOUR_CLIENT_ID"'
body:
{
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "sample@fax.plus",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"sample@fax.plus"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"push_notifications": {
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"sms": {
"low_credit": true,
"new_feature": true,
"numbers": [
"+16699990000"
],
"receive_fax": true,
"send_fax": true,
"voicemail": true
}
}
},
"phone": "+16699990000",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}const axios = require('axios');
const AccountsApiFp = require('@alohi/faxplus-api').AccountsApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;
const config = new Configuration({
accessToken: accessToken,
basePath: 'https://restapi.fax.plus/v3',
// Header required only when using the OAuth2 token scheme
baseOptions: {
headers: {
"x-fax-clientid": clientId,
}
}
});
async function updateUser() {
const reqParams = {
"userId": '473e1eb6',
"payloadAccountModification": {
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "sample@fax.plus",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"sample@fax.plus"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"push_notifications": {
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"sms": {
"low_credit": true,
"new_feature": true,
"numbers": [
"+16699990000"
],
"receive_fax": true,
"send_fax": true,
"voicemail": true
}
}
},
"phone": "+16699990000",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
}
const req = await AccountsApiFp(config).updateUser(reqParams);
const resp = await req(axios);
}
updateUser()
from faxplus import ApiClient, AccountsApi, \
AccountData, \
AccountNotificationsBlacklist, \
AccountNotificationsEmailSettings, \
AccountNotificationsPushSettings, \
AccountNotificationsSlackSettings, \
AccountNotificationsSmsSettings, \
AccountNotificationsSettings, \
AccountNotifications, \
RetryOptions, \
AccountSettings, \
PayloadAccountModification
from faxplus.configuration import Configuration
account_data = AccountData(default_file_type='pdf',
save_history=True)
account_notifications_blacklist = AccountNotificationsBlacklist(uids=[])
account_notifications_email_settings = AccountNotificationsEmailSettings(addresses=['sample@fax.plus'],
attachments=dict(),
low_credit=True,
new_feature=True,
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_push_settings = AccountNotificationsPushSettings(low_credit=True,
new_feature=True,
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_slack_settings = AccountNotificationsSlackSettings()
account_notifications_sms_settings = AccountNotificationsSmsSettings(low_credit=True,
new_feature=True,
numbers=['+16699990000'],
receive_fax=True,
send_fax=True,
voicemail=True)
account_notifications_settings = AccountNotificationsSettings(email=account_notifications_email_settings,
language='en',
push_notifications=account_notifications_push_settings,
slack=account_notifications_slack_settings,
sms=account_notifications_sms_settings)
account_notifications = AccountNotifications(black_list=account_notifications_blacklist,
settings=account_notifications_settings)
retry_options = RetryOptions(count=0,
delay=0)
account_settings = AccountSettings(caller_id_name='Fax.Plus',
options=None,
send_fax=dict(retry=retry_options))
payload_account_modification = PayloadAccountModification(account_data=account_data,
email='sample@fax.plus',
lastname='Smith',
name='John',
notifications=account_notifications,
phone='+16699990000',
settings=account_settings)
conf = Configuration()
conf.access_token = access_token
# header_name and header_value required only when using the OAuth2 token scheme
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = AccountsApi(api_client)
api.update_user(
user_id='473e1eb6',
body=payload_account_modification
)
/**
* Example below uses Apache HTTP Client 4 with Fluent API
**/
Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "'473e1eb6'");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}");
String jsonBody = ...; // See request body example
String result = Request
.Put(url)
// The x-fax-clientid header is required only when using the OAuth2 token scheme
.addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
.addHeader("Content-Type", "'application/json'")
.addHeader("Accept", "'application/json'")
.addHeader("Authorization", "'Bearer {access-token}'")
.bodyString(jsonBody, "application/json")
.execute()
.returnContent().asString();
System.out.println(result.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
// The x-fax-clientid header is required only when using the OAuth2 token scheme
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
"x-fax-clientid": []string{"YOUR_CLIENT_ID"}
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://restapi.fax.plus/v3/accounts/{user_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
// The x-fax-clientid header is required only when using the OAuth2 token scheme
'x-fax-clientid' => '{client ID}',
);
$client = new GuzzleHttp\Client();
// Define array of request body.
$request_body = ...; // See request body example
try {
$response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
# You can also use wget
curl -X PUT https://restapi.fax.plus/v3/accounts/{user_id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
# The x-fax-clientid header is required only when using the OAuth2 token scheme
-H 'x-fax-clientid: "YOUR_CLIENT_ID"'
body:
{
"account_data": {
"default_file_type": "pdf",
"save_history": true
},
"email": "sample@fax.plus",
"name": "John",
"lastname": "Smith",
"notifications": {
"black_list": {
"uids": []
},
"settings": {
"email": {
"addresses": [
"sample@fax.plus"
],
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"language": "en",
"push_notifications": {
"low_credit": true,
"new_feature": true,
"receive_fax": true,
"send_fax": true,
"voicemail": true
},
"sms": {
"low_credit": true,
"new_feature": true,
"numbers": [
"+16699990000"
],
"receive_fax": true,
"send_fax": true,
"voicemail": true
}
}
},
"phone": "+16699990000",
"settings": {
"caller_id_name": "Fax.Plus",
"send_fax": {
"options": {},
"retry": {
"count": 0,
"delay": 0
},
"should_enhance": true
}
}
}
Authorizations
oauth2personal_access_token
OAuth2 Authorization Grant
Path Parameters
User ID to modify. Use 'self' for your own account, or provide a specific user ID for corporate member accounts.
Body
application/json
Request object for making changes in account
Model for updating user account
Show child attributes
Show child attributes
Account email address
Pattern:
^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$Your last name
Your first name
Account notification settings
Show child attributes
Show child attributes
Your account phone number
Pattern:
^[+]?[0-9]{8,}$Profile image path
Account settings
Show child attributes
Show child attributes
Response
Modify account information
⌘I