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',
fax_number: '+12025559999'
};
const req = await ContactsApiFp(config).updateContact({
userId: 'self',
contactId: 'contact_123',
body: updateData
});
const resp = await req(axios);
}
updateContact()
from faxplus import ApiClient, ContactsApi
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = ContactsApi(api_client)
update_data = {
'name': 'Jane Smith',
'fax_number': '+12025559999'
}
resp = api.update_contact(user_id='self', contact_id='contact_123', body=update_data)
curl -X PUT https://restapi.fax.plus/v3/accounts/self/contacts/contact_123 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-H 'x-fax-clientid: "YOUR_CLIENT_ID"' \
-d '{
"name": "Jane Smith",
"fax_number": "+12025559999"
}'
{
"id": "5f7a8b9c0d1e2f3a4b5c6d7e",
"name": "John Doe",
"fax_number": "+12025551234",
"groups": [
"sales",
"department 001"
],
"email": "john.doe@example.com",
"cellphone": "+12025551235",
"phone": "+12025551236",
"notes": "VIP client, prefers email communication",
"is_shared": false,
"is_telefax": false,
"creation_date": "2024-01-15T10:30:00Z",
"modification_date": "2024-03-20T14:45:00Z"
}{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "unauthorized",
"description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."
}{
"error": "bad_request",
"description": "Requested resource was not found."
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}Update a contact
Update an existing contact (Permitted scopes: fax:all:edit)
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',
fax_number: '+12025559999'
};
const req = await ContactsApiFp(config).updateContact({
userId: 'self',
contactId: 'contact_123',
body: updateData
});
const resp = await req(axios);
}
updateContact()
from faxplus import ApiClient, ContactsApi
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = ContactsApi(api_client)
update_data = {
'name': 'Jane Smith',
'fax_number': '+12025559999'
}
resp = api.update_contact(user_id='self', contact_id='contact_123', body=update_data)
curl -X PUT https://restapi.fax.plus/v3/accounts/self/contacts/contact_123 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-H 'x-fax-clientid: "YOUR_CLIENT_ID"' \
-d '{
"name": "Jane Smith",
"fax_number": "+12025559999"
}'
{
"id": "5f7a8b9c0d1e2f3a4b5c6d7e",
"name": "John Doe",
"fax_number": "+12025551234",
"groups": [
"sales",
"department 001"
],
"email": "john.doe@example.com",
"cellphone": "+12025551235",
"phone": "+12025551236",
"notes": "VIP client, prefers email communication",
"is_shared": false,
"is_telefax": false,
"creation_date": "2024-01-15T10:30:00Z",
"modification_date": "2024-03-20T14:45:00Z"
}{
"error": "invalid_user_id",
"description": "Invalid user id given"
}{
"error": "unauthorized",
"description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."
}{
"error": "bad_request",
"description": "Requested resource was not found."
}{
"error": "internal_server_error",
"description": "An unexpected error happened, please contact support"
}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',
fax_number: '+12025559999'
};
const req = await ContactsApiFp(config).updateContact({
userId: 'self',
contactId: 'contact_123',
body: updateData
});
const resp = await req(axios);
}
updateContact()
from faxplus import ApiClient, ContactsApi
from faxplus.configuration import Configuration
conf = Configuration()
conf.access_token = access_token
api_client = ApiClient(header_name='x-fax-clientid', header_value=client_id, configuration=conf)
api = ContactsApi(api_client)
update_data = {
'name': 'Jane Smith',
'fax_number': '+12025559999'
}
resp = api.update_contact(user_id='self', contact_id='contact_123', body=update_data)
curl -X PUT https://restapi.fax.plus/v3/accounts/self/contacts/contact_123 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' \
-H 'x-fax-clientid: "YOUR_CLIENT_ID"' \
-d '{
"name": "Jane Smith",
"fax_number": "+12025559999"
}'
Authorizations
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
Body
Contact name
100"Jane Smith"
Contact's fax number
2 - 20^[+]?[0-9]*$"+12025559999"
Contact's email address
100^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"jane.smith@example.com"
Contact's cellphone number
20^$|^[+]?[0-9]*$"+12025559998"
Contact's phone number
20^$|^[+]?[0-9]*$"+12025559997"
Additional notes
1000"Updated contact information"
List of group names
50100["engineering"]
Whether this contact has a human fax operator. When enabled, an IVR will ask the operator to switch to fax mode
false
Response
Response containing a single contact object
Contact ID
"5f7a8b9c0d1e2f3a4b5c6d7e"
Contact name
"John Doe"
Contact's fax number
"+12025551234"
List of group names
["sales", "department 001"]
Contact's email address
"john.doe@example.com"
Contact's cellphone number
"+12025551235"
Contact's phone number
"+12025551236"
Additional notes
"VIP client, prefers email communication"
Whether contact is shared with corporate members
false
Whether contact has a human fax operator
false
Date contact was created
"2024-01-15T10:30:00Z"
Date contact was last modified
"2024-03-20T14:45:00Z"