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()
This response has no body data.
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()

Authorizations

Authorization
string
header
required

OAuth2 Authorization Grant

Path Parameters

user_id
string
default:
self
required

User ID to get information about. For your own account use 'self'

Body

application/json
Request object for making changes in account

Model for updating user account

account_data
object
email
string

Account email address

lastname
string

Your last name

name
string

Your first name

notifications
object

Account notification settings

phone
string

Your account phone number

profile_image
string

Profile image path

settings
object

Account settings