> ## 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.

# List corporate members

> Get account information of all non-admin members of your corporate account. Only the admin account can send a request to this endpoint which returns the accounts of all members (Permitted scopes: **fax:all:read**, **fax:member:read**)

<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 getAccounts() {
      const req = await AccountsApiFp(config).getAccounts();
      const resp = await req(axios);
  }

  getAccounts()
  ```

  ```python Python SDK theme={null}
  from faxplus import ApiClient, AccountsApi
  from faxplus.configuration import Configuration

  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)
  resp = api.get_accounts()
  ```

  ```java Java theme={null}
  /**
   * Example below uses Apache HTTP Client 4 with Fluent API
   **/

  String url = "https://restapi.fax.plus/v3/accounts";

  String result = Request
      .Get(url)
       // The x-fax-clientid header is required only when using the OAuth2 token scheme
      .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
      .addHeader("Accept", "'application/json'")
      .addHeader("Authorization", "'Bearer {access-token}'")
      .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
          "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("GET", "https://restapi.fax.plus/v3/accounts", 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();

  try {
      $response = $client->request('GET','https://restapi.fax.plus/v3/accounts', array(
          'headers' => $headers,
          )
      );
      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 GET https://restapi.fax.plus/v3/accounts \
    -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"'
  ```
</RequestExample>


## OpenAPI

````yaml get /accounts
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:
    get:
      tags:
        - Accounts
      summary: List corporate members
      description: >-
        Get account information of all non-admin members of your corporate
        account. Only the admin account can send a request to this endpoint
        which returns the accounts of all members (Permitted scopes:
        **fax:all:read**, **fax:member:read**)
      operationId: getAccounts
      responses:
        '200':
          $ref: '#/components/responses/AccountList'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - personal_access_token:
            - fax:all:read
            - fax:member:read
        - oauth2:
            - all
components:
  responses:
    AccountList:
      description: Object containing account information
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AccountList'
    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
    UnauthorizedError:
      description: Error object in case there's a problem with the authorization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
            description: >-
              The access token provided is expired, revoked, malformed, or
              invalid for other reasons.
    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:
    AccountList:
      description: List of user accounts
      properties:
        members:
          items:
            $ref: '#/components/schemas/Account'
          type: array
      required:
        - members
      type: object
      additionalProperties: false
    Error:
      properties:
        description:
          type: string
        error:
          type: string
      additionalProperties: false
    Account:
      description: User account model
      example:
        account_data:
          company_name: Company name
          default_file_type: pdf
          save_history: true
        account_type: corporate_admin
        creation_date: '2017-05-06 05:22:21'
        email: sample@fax.plus
        last_password_modification_date: '2017-05-06 05:22:21'
        lastname: Smith
        member_of: {}
        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: fa
            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'
        profile_image: ''
        settings:
          caller_id_name: Fax.Plus
          send_fax:
            options: {}
            retry:
              count: 0
              delay: 0
            should_enhance: true
            default_resolution: fine
            partially_sent_retry: false
        status: active
        uid: 7724157c0974440293e45877c57f0703
      properties:
        account_data:
          $ref: '#/components/schemas/AccountData'
        account_type:
          $ref: '#/components/schemas/AccountType'
        creation_date:
          description: 'Creation date in UTC. Format: *YYYY-MM-DD HH:mm:ss*'
          pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
          type: string
        email:
          description: Account email address
          pattern: ^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$
          type: string
        last_password_modification_date:
          description: The date on which you have changed your password
          type: string
        lastname:
          description: Your last name
          type: string
        member_of:
          description: List of user ids that you are member of.
          items:
            type: string
          type: array
        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'
        status:
          $ref: '#/components/schemas/AccountStatus'
        uid:
          description: User ID of current user
          type: string
      required:
        - uid
        - account_type
        - status
        - email
        - creation_date
      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
    AccountType:
      description: Account type which could be corporate_admin, individual, etc
      enum:
        - corporate_admin
        - individual
        - corporate_member
      type: string
    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
    AccountStatus:
      description: Your account status which could be active, inactive etc
      enum:
        - active
        - unverified_phone
        - suspended
        - disabled
        - inactive
        - deleted
        - corporate_deleted
        - waiting_for_signup
      type: string
    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:
    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.
    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

````