> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.fax.plus/llms.txt
> Use this file to discover all available pages before exploring further.

# 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**)

<RequestExample>
  ```js NodeJS SDK theme={null}
  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()
  ```

  ```python Python SDK theme={null}
  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
  )
  ```

  ```java Java theme={null}
  /**
   * 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());
  ```

  ```go Go theme={null}
  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 PHP theme={null}
  <?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());
   }

   // ...
  ```

  ```bash cURL theme={null}
  # 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
      }
    }
  }
  ```
</RequestExample>


## OpenAPI

````yaml put /accounts/{user_id}
openapi: 3.0.1
info:
  title: Fax.Plus REST API
  description: >-
    This is the Fax.Plus API v3 developed for third party developers and
    organizations. In order to have a better coding experience with this API,
    let's quickly go through some points:<br /><br /> - This API assumes
    **/accounts** as an entry point with the base url of
    **https://restapi.fax.plus/v3**. <br /><br /> - This API treats all date and
    times sent to it in requests as **UTC**. Also, all dates and times returned
    in responses are in **UTC**<br /><br /> - Once you have an access_token, you
    can easily send a request to the resource server with the base url of
    **https://restapi.fax.plus/v3** to access your permitted resources. As an
    example to get the user's profile info you would send a request to
    **https://restapi.fax.plus/v3/accounts/self** when **Authorization** header
    is set to **Bearer YOUR_ACCESS_TOKEN** and custom header of
    **x-fax-clientid** is set to YOUR_CLIENT_ID
  version: 3.4.0
  contact:
    name: Fax.Plus
    email: info@fax.plus
    url: https://github.com/alohi
servers:
  - url: https://restapi.fax.plus/v3
  - url: /v3
security: []
paths:
  /accounts/{user_id}:
    put:
      tags:
        - Accounts
      summary: Modify account information
      description: >-
        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**)
      operationId: updateUser
      parameters:
        - description: >-
            User ID to modify. Use 'self' for your own account, or provide a
            specific user ID for corporate member accounts.
          name: user_id
          in: path
          required: true
          schema:
            type: string
            default: self
          example: self
      requestBody:
        $ref: '#/components/requestBodies/PayloadAccountModification'
      responses:
        '204':
          description: Modify account information
        '400':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - oauth2:
            - all
        - personal_access_token:
            - fax:all:edit
            - fax:member:edit
            - fax:all:edit
components:
  requestBodies:
    PayloadAccountModification:
      description: Request object for making changes in account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PayloadAccountModification'
  responses:
    Error:
      description: Error object in case there's a problem with given data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: invalid_user_id
            description: Invalid user id given
    ServerError:
      description: Error object in case there's a server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: internal_server_error
            description: An unexpected error happened, please contact support
  schemas:
    PayloadAccountModification:
      type: object
      description: Model for updating user account
      example:
        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
            default_resolution: fine
            partially_sent_retry: false
      properties:
        account_data:
          $ref: '#/components/schemas/AccountData'
        email:
          description: Account email address
          pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$
          type: string
        lastname:
          description: Your last name
          type: string
        name:
          description: Your first name
          type: string
        notifications:
          $ref: '#/components/schemas/AccountNotifications'
        phone:
          description: Your account phone number
          pattern: ^[+]?[0-9]{8,}$
          type: string
        profile_image:
          description: Profile image path
          type: string
        settings:
          $ref: '#/components/schemas/AccountSettings'
      additionalProperties: false
    Error:
      properties:
        description:
          type: string
        error:
          type: string
      additionalProperties: false
    AccountData:
      properties:
        company_logo:
          description: File name of your company logo
          type: string
        company_name:
          description: Your company name in case you are a corporate admin
          type: string
        deactivation_reason:
          type: string
        default_file_type:
          $ref: '#/components/schemas/FileType'
        role:
          description: Role of the account in the company
          type: string
        save_history:
          description: Save fax CDRs in inbox status
          type: boolean
      type: object
      additionalProperties: false
    AccountNotifications:
      description: Account notification settings
      properties:
        black_list:
          $ref: '#/components/schemas/AccountNotificationsBlacklist'
        settings:
          $ref: '#/components/schemas/AccountNotificationsSettings'
      required:
        - settings
      type: object
      additionalProperties: false
    AccountSettings:
      description: Account settings
      properties:
        caller_id_name:
          description: Account caller id name
          type: string
        options:
          type: object
        send_fax:
          properties:
            retry:
              $ref: '#/components/schemas/RetryOptions'
            should_enhance:
              type: boolean
              description: Enable text enhancement for faxes by default
            default_resolution:
              type: string
              enum:
                - fine
                - superfine
              default: fine
              description: Default fax resolution
            partially_sent_retry:
              type: boolean
              description: Enable automatic retry for partially sent faxes
          type: object
        should_enhance:
          type: boolean
          deprecated: true
          description: Deprecated. Use settings.send_fax.should_enhance instead
      type: object
      additionalProperties: false
    FileType:
      description: File type
      enum:
        - tiff
        - pdf
      type: string
    AccountNotificationsBlacklist:
      properties:
        uids:
          items:
            type: string
          type: array
      required:
        - uids
      type: object
      additionalProperties: false
    AccountNotificationsSettings:
      properties:
        email:
          $ref: '#/components/schemas/AccountNotificationsEmailSettings'
        language:
          $ref: '#/components/schemas/AccountNotificationsLanguage'
        push_notifications:
          $ref: '#/components/schemas/AccountNotificationsPushSettings'
        slack:
          $ref: '#/components/schemas/AccountNotificationsSlackSettings'
        sms:
          $ref: '#/components/schemas/AccountNotificationsSmsSettings'
      description: Account notification settings
      required:
        - email
        - push_notifications
        - sms
      type: object
      additionalProperties: false
    RetryOptions:
      description: Fax retry settings
      example:
        retry:
          count: 2
          delay: 10
      properties:
        count:
          description: Number of tries to send the fax
          maximum: 3
          minimum: 0
          type: integer
        delay:
          description: Delay in seconds between two retries
          maximum: 180
          minimum: 0
          type: integer
      type: object
      additionalProperties: false
    AccountNotificationsEmailSettings:
      description: Email notification settings
      properties:
        addresses:
          description: List of email addresses to send notifications to
          items:
            type: string
          type: array
        attachments:
          description: Email attachments settings
          properties:
            confirmation_page:
              type: boolean
            receive_fax:
              description: >-
                Set to true if you want to receive new faxes as notification
                attachments
              type: boolean
            send_fax:
              description: >-
                Set to true if you want to receive your sent fax as an
                attachment to the notification
              type: boolean
          required:
            - send_fax
            - receive_fax
          type: object
        low_credit:
          description: >-
            Set to true if you want to receive notifications when your balance
            is low
          type: boolean
        new_feature:
          description: >-
            Set to true if you want to receive notifications about our new
            features
          type: boolean
        receive_fax:
          description: >-
            Set to true if you want to receive notifications about receiving
            faxes
          type: boolean
        send_fax:
          description: >-
            Set to true if you want to receive notifications when your fax is
            being send
          type: boolean
        voicemail:
          description: Set to true if you want to receive new voicemail notifications
          type: boolean
      required:
        - voicemail
        - receive_fax
        - low_credit
        - new_feature
        - send_fax
      type: object
      additionalProperties: false
    AccountNotificationsLanguage:
      description: Notifications language
      enum:
        - en
      type: string
    AccountNotificationsPushSettings:
      description: Push notification settings
      properties:
        low_credit:
          description: >-
            Set to true if you want to receive notifications when your balance
            is low
          type: boolean
        new_feature:
          description: >-
            Set to true if you want to receive notifications about our new
            features
          type: boolean
        receive_fax:
          description: >-
            Set to true if you want to receive notifications about receiving
            faxes
          type: boolean
        send_fax:
          description: >-
            Set to true if you want to receive notifications when your fax is
            being send
          type: boolean
        voicemail:
          description: Set to true if you want to receive new voicemail notifications
          type: boolean
      required:
        - voicemail
        - receive_fax
        - low_credit
        - new_feature
        - send_fax
      type: object
      additionalProperties: false
    AccountNotificationsSlackSettings:
      description: Slack notification settings
      properties:
        receive_fax:
          $ref: '#/components/schemas/SlackNotificationMode'
        send_fax:
          $ref: '#/components/schemas/SlackNotificationMode'
        target_channel:
          description: Channel to send notifications
          type: string
      required:
        - target_channel
        - receive_fax
        - send_fax
      type: object
      additionalProperties: false
    AccountNotificationsSmsSettings:
      description: SMS notification settings
      properties:
        low_credit:
          description: >-
            Set to true if you want to receive notifications when your balance
            is low
          type: boolean
        new_feature:
          description: >-
            Set to true if you want to receive notifications about our new
            features
          type: boolean
        numbers:
          description: List of phone numbers to send SMS notifications to
          items:
            type: string
          type: array
        receive_fax:
          description: >-
            Set to true if you want to receive notifications about receiving
            faxes
          type: boolean
        send_fax:
          description: >-
            Set to true if you want to receive notifications when your fax is
            being send
          type: boolean
        voicemail:
          description: Set to true if you want to receive new voicemail notifications
          type: boolean
      required:
        - voicemail
        - receive_fax
        - low_credit
        - new_feature
        - send_fax
      type: object
      additionalProperties: false
    SlackNotificationMode:
      enum:
        - with_attachment
        - no_attachment
        - 'off'
      type: string
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth2 Authorization Grant
      flows:
        authorizationCode:
          authorizationUrl: >-
            https://accounts.fax.plus/login?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=http://localhost&scope=all
          tokenUrl: https://accounts.fax.plus/token
          refreshUrl: >-
            https://accounts.fax.plus/token?grant_type=refresh_token&refresh_token=YOUR_REFRESH_TOKEN
          scopes:
            all: >-
              for now when a user grants permission, all grants will be
              permitted
    personal_access_token:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Personal Access Token (PAT) is a Bearer token used for secure API calls.
        For direct API calls, the PAT is used in the Authorization header as
        'Bearer {PAT}'. For MCP usage, configure your PAT in your MCP client
        settings (e.g., in your IDE's MCP server configuration) - authentication
        will be handled automatically.

````