Skip to main content
PUT
/
accounts
/
self
/
contacts
/
{contact_id}
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',
    baseOptions: {
        headers: {
          "x-fax-clientid": clientId,
        }
    }
});

async function updateContact() {
    const updateData = {
        name: 'Jane Smith',
        company: 'Updated Corp',
        numbers: ['+1987654321']
    };
    const req = await ContactsApiFp(config).updateContact({
        userId: 'self',
        contactId: 'contact_123',
        body: updateData
    });
    const resp = await req(axios);
}

updateContact()
{
  "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',
    baseOptions: {
        headers: {
          "x-fax-clientid": clientId,
        }
    }
});

async function updateContact() {
    const updateData = {
        name: 'Jane Smith',
        company: 'Updated Corp',
        numbers: ['+1987654321']
    };
    const req = await ContactsApiFp(config).updateContact({
        userId: 'self',
        contactId: 'contact_123',
        body: updateData
    });
    const resp = await req(axios);
}

updateContact()

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.

Path Parameters

contact_id
string
required

Contact ID

Body

application/json
name
string

Contact name

Example:

"Jane Smith"

company
string

Company name

Example:

"Updated Corp"

fax_number
string

Contact's fax number

Example:

"+12025559999"

email
string

Contact's email address

cellphone
string

Contact's cellphone number

Example:

"+12025559998"

phone
string

Contact's phone number

Example:

"+12025559997"

address
string

Contact address

Example:

"456 Oak Ave, Boston, MA 02101"

notes
string

Additional notes

Example:

"Updated contact information"

groups
string[]

List of group IDs

Example:
["5f7a8b9c0d1e2f3a4b5c6d7f"]
is_telefax
boolean

Whether this contact has a human fax operator

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"