Skip to main content
GET
/
accounts
/
self
/
contacts
const axios = require('axios');
const ContactsApiFp = require('@alohi/faxplus-api').ContactsApiFp;
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 listContacts() {
    const req = await ContactsApiFp(config).listContacts({
        userId: 'self',
        search: '',
        offset: 0,
        limit: 50
    });
    const resp = await req(axios);
}

listContacts()
{
  "records": [
    {
      "id": "5f7a8b9c0d1e2f3a4b5c6d7e",
      "name": "John Doe",
      "company": "Acme Corporation",
      "fax_number": "+12025551234",
      "groups": [
        "5f7a8b9c0d1e2f3a4b5c6d7f",
        "5f7a8b9c0d1e2f3a4b5c6d80"
      ],
      "email": "[email protected]",
      "cellphone": "+12025551235",
      "phone": "+12025551236",
      "address": "123 Main St, Suite 100, New York, NY 10001",
      "notes": "VIP client, prefers email communication",
      "is_shared": false,
      "creation_date": "2024-01-15T10:30:00Z",
      "modification_date": "2024-03-20T14:45:00Z"
    }
  ],
  "total_count": 123
}
const axios = require('axios');
const ContactsApiFp = require('@alohi/faxplus-api').ContactsApiFp;
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 listContacts() {
    const req = await ContactsApiFp(config).listContacts({
        userId: 'self',
        search: '',
        offset: 0,
        limit: 50
    });
    const resp = await req(axios);
}

listContacts()

Authorizations

Authorization
string
header
required

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.

Query Parameters

ids
string

Comma-separated list of contact IDs to retrieve (max 50). When provided, other search/pagination parameters are ignored.

Search term to filter contacts by name, fax number, groups, or notes

offset
integer
default:0

Offset for pagination

limit
integer
default:50

Limit for pagination (max 50)

Required range: x <= 50
sort
enum<string>
default:name

Field to sort by

Available options:
name,
company,
creation_date,
modification_date
direction
enum<string>
default:asc

Sort direction

Available options:
asc,
desc
shared
boolean
default:false

If true, return shared/corporate contacts. If false, return personal contacts

Response

Response containing a list of contacts

records
object[]

List of contacts

total_count
integer

Total number of contacts matching the query