Skip to main content
POST
/
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 createContact() {
    const contactData = {
        name: 'John Doe',
        company: 'Acme Corp',
        numbers: ['+1234567890'],
        emails: ['[email protected]'],
        address: '123 Main St',
        notes: 'Important client'
    };
    const req = await ContactsApiFp(config).createContact({
        userId: 'self',
        body: contactData
    });
    const resp = await req(axios);
}

createContact()
{
  "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"
}
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 createContact() {
    const contactData = {
        name: 'John Doe',
        company: 'Acme Corp',
        numbers: ['+1234567890'],
        emails: ['[email protected]'],
        address: '123 Main St',
        notes: 'Important client'
    };
    const req = await ContactsApiFp(config).createContact({
        userId: 'self',
        body: contactData
    });
    const resp = await req(axios);
}

createContact()

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.

Body

application/json
name
string
required

Contact name

Example:

"John Doe"

company
string

Company name

Example:

"Acme Corporation"

fax_number
string

Contact's fax number

Example:

"+12025551234"

email
string

Contact's email address

cellphone
string

Contact's cellphone number

Example:

"+12025551235"

phone
string

Contact's phone number

Example:

"+12025551236"

address
string

Contact address

Example:

"123 Main St, New York, NY 10001"

notes
string

Additional notes

Example:

"Prefers email communication"

groups
string[]

List of group IDs

Example:
["5f7a8b9c0d1e2f3a4b5c6d7f"]
is_telefax
boolean

Whether this contact has a human fax operator

Example:

false

shared
boolean

Whether to share contact with corporate members

Example:

false

Response

Response containing a single contact object

id
string

Contact ID

Example:

"5f7a8b9c0d1e2f3a4b5c6d7e"

name
string

Contact name

Example:

"John Doe"

company
string

Company name

Example:

"Acme Corporation"

fax_number
string

Contact's fax number

Example:

"+12025551234"

groups
string[]

List of group IDs

Example:
[
"5f7a8b9c0d1e2f3a4b5c6d7f",
"5f7a8b9c0d1e2f3a4b5c6d80"
]
email
string

Contact's email address

cellphone
string

Contact's cellphone number

Example:

"+12025551235"

phone
string

Contact's phone number

Example:

"+12025551236"

address
string

Contact address

Example:

"123 Main St, Suite 100, New York, NY 10001"

notes
string

Additional notes

Example:

"VIP client, prefers email communication"

is_shared
boolean

Whether contact is shared with corporate members

Example:

false

creation_date
string

Date contact was created

Example:

"2024-01-15T10:30:00Z"

modification_date
string

Date contact was last modified

Example:

"2024-03-20T14:45:00Z"