# Get account information Source: https://apidoc.fax.plus/api-reference/endpoints/accounts/get-account-information get /accounts/{user_id} Get information about an account. For members user_id can only be self. For admin it can be either self, or a user_id of any corporate member. (Permitted scopes: **fax:all:read**, **fax:member:read**, **fax:user:read**) ```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 getUser() { const reqParams = { "userId": '473e1eb6' } const req = await AccountsApiFp(config).getUser(reqParams); const resp = await req(axios); } getUser() ``` ```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_user( user_id='473e1eb6') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'473e1eb6'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}"); 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/{user_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}', 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/{user_id} \ -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"' ``` # Get member details Source: https://apidoc.fax.plus/api-reference/endpoints/accounts/get-member-details get /accounts/self/member-details/{member_user_id} Get corporate member's role and faxing quota (Permitted scopes: **fax:all:read**, **fax:member:read**) ```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 getMemberDetails() { const reqParams = { "memberUserId": '473e1eb612451s' } const req = await AccountsApiFp(config).getMemberDetails(reqParams); const resp = await req(axios); } getMemberDetails() ``` ```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_member_details( member_user_id='473e1eb612451s') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("member_user_id", "'473e1eb612451s'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/self/member-details/{member_user_id}"); 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/self/member-details/{member_user_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/self/member-details/{member_user_id}', 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/self/member-details/{member_user_id} \ -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"' ``` # Get user plan Source: https://apidoc.fax.plus/api-reference/endpoints/accounts/get-user-plan get /accounts/{user_id}/plan Get the plan type for an account. For Business and Enterprise plans, the response also includes permission flags indicating whether the user is an admin or owner. (Permitted scopes: **fax:all:read**, **fax:member:read**, **fax:user:read**) ```bash cURL theme={null} curl -X GET https://restapi.fax.plus/v3/accounts/{user_id}/plan \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: YOUR_CLIENT_ID' ``` ```http HTTP theme={null} GET /v3/accounts/{user_id}/plan HTTP/1.1 Host: restapi.fax.plus Accept: application/json Authorization: Bearer {access-token} x-fax-clientid: YOUR_CLIENT_ID ``` # Invite corporate members Source: https://apidoc.fax.plus/api-reference/endpoints/accounts/invite-corporate-members post /accounts/self/member-invitations Invite new users to join your corporate account by sending them email invitations (maximum 10 per request). Only corporate admins with appropriate permissions can use this endpoint. (Permitted scopes: **fax:all:edit**, **fax:member:edit**) You can invite up to 10 users per request. If you need to invite more users, make multiple requests. ```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 inviteMembers() { const emails = ["user1@example.com", "user2@example.com"]; const req = await AccountsApiFp(config).inviteMembers(emails); const resp = await req(axios); } inviteMembers() ``` ```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) emails = ["user1@example.com", "user2@example.com"] resp = api.invite_members(emails) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ String url = "https://restapi.fax.plus/v3/accounts/self/member-invitations"; String jsonBody = "[\"user1@example.com\", \"user2@example.com\"]"; String result = Request .Post(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("Content-Type", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, ContentType.APPLICATION_JSON) .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"}, "Content-Type": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, "x-fax-clientid": []string{"YOUR_CLIENT_ID"} } jsonBody := []byte(`["user1@example.com", "user2@example.com"]`) data := bytes.NewBuffer(jsonBody) req, err := http.NewRequest("POST", "https://restapi.fax.plus/v3/accounts/self/member-invitations", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} 'application/json', 'Content-Type' => '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('POST','https://restapi.fax.plus/v3/accounts/self/member-invitations', array( 'headers' => $headers, 'json' => ["user1@example.com", "user2@example.com"], ) ); 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 POST https://restapi.fax.plus/v3/accounts/self/member-invitations \ -H 'Accept: application/json' \ -H 'Content-Type: 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"' \ -d '["user1@example.com", "user2@example.com"]' ``` # List corporate members Source: https://apidoc.fax.plus/api-reference/endpoints/accounts/list-corporate-members get /accounts 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**) ```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} '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"' ``` # Modify account information Source: https://apidoc.fax.plus/api-reference/endpoints/accounts/modify-account-information put /accounts/{user_id} Modify personal information of your own account or your corporate member's account. user_id can be either self, or a subordinate's user_id. (Permitted scopes: **fax:all:edit**, **fax:member:edit**, **fax:user:edit**) ```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 updateUser() { const reqParams = { "userId": '473e1eb6', "payloadAccountModification": { "account_data": { "default_file_type": "pdf", "save_history": true }, "email": "sample@fax.plus", "name": "John", "lastname": "Smith", "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": "en", "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", "settings": { "caller_id_name": "Fax.Plus", "send_fax": { "options": {}, "retry": { "count": 0, "delay": 0 }, "should_enhance": true } } } } const req = await AccountsApiFp(config).updateUser(reqParams); const resp = await req(axios); } updateUser() ``` ```python Python SDK theme={null} from faxplus import ApiClient, AccountsApi, \ AccountData, \ AccountNotificationsBlacklist, \ AccountNotificationsEmailSettings, \ AccountNotificationsPushSettings, \ AccountNotificationsSlackSettings, \ AccountNotificationsSmsSettings, \ AccountNotificationsSettings, \ AccountNotifications, \ RetryOptions, \ AccountSettings, \ PayloadAccountModification from faxplus.configuration import Configuration account_data = AccountData(default_file_type='pdf', save_history=True) account_notifications_blacklist = AccountNotificationsBlacklist(uids=[]) account_notifications_email_settings = AccountNotificationsEmailSettings(addresses=['sample@fax.plus'], attachments=dict(), low_credit=True, new_feature=True, receive_fax=True, send_fax=True, voicemail=True) account_notifications_push_settings = AccountNotificationsPushSettings(low_credit=True, new_feature=True, receive_fax=True, send_fax=True, voicemail=True) account_notifications_slack_settings = AccountNotificationsSlackSettings() account_notifications_sms_settings = AccountNotificationsSmsSettings(low_credit=True, new_feature=True, numbers=['+16699990000'], receive_fax=True, send_fax=True, voicemail=True) account_notifications_settings = AccountNotificationsSettings(email=account_notifications_email_settings, language='en', push_notifications=account_notifications_push_settings, slack=account_notifications_slack_settings, sms=account_notifications_sms_settings) account_notifications = AccountNotifications(black_list=account_notifications_blacklist, settings=account_notifications_settings) retry_options = RetryOptions(count=0, delay=0) account_settings = AccountSettings(caller_id_name='Fax.Plus', options=None, send_fax=dict(retry=retry_options)) payload_account_modification = PayloadAccountModification(account_data=account_data, email='sample@fax.plus', lastname='Smith', name='John', notifications=account_notifications, phone='+16699990000', settings=account_settings) 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) api.update_user( user_id='473e1eb6', body=payload_account_modification ) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'473e1eb6'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}"); String jsonBody = ...; // See request body example String result = Request .Put(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR_CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .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 "Content-Type": []string{"application/json"}, "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("PUT", "https://restapi.fax.plus/v3/accounts/{user_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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(); // Define array of request body. $request_body = ...; // See request body example try { $response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}', array( 'headers' => $headers, 'json' => $request_body, ) ); 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 PUT https://restapi.fax.plus/v3/accounts/{user_id} \ -H 'Content-Type: application/json' \ -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"' body: { "account_data": { "default_file_type": "pdf", "save_history": true }, "email": "sample@fax.plus", "name": "John", "lastname": "Smith", "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": "en", "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", "settings": { "caller_id_name": "Fax.Plus", "send_fax": { "options": {}, "retry": { "count": 0, "delay": 0 }, "should_enhance": true } } } ``` # Modify member details Source: https://apidoc.fax.plus/api-reference/endpoints/accounts/modify-member-details put /accounts/self/member-details/{member_user_id} Update corporate member's role and faxing quota. (Permitted scopes: **fax:all:edit**, **fax:member:edit**) ```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 updateMemberDetails() { const reqParams = { "memberUserId": '473e1e2fs1b6', "memberDetail": { "quota": 400, "role": "Sales Manager" } } const req = await AccountsApiFp(config).updateMemberDetails(reqParams); const resp = await req(axios); } updateMemberDetails(); ``` ```python Python SDK theme={null} from faxplus import ApiClient, AccountsApi, \ MemberDetail from faxplus.configuration import Configuration member_detail = MemberDetail(quota=400, role='Sales Manager') 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) api.update_member_details( member_user_id='473e1e2fs1b6', body=member_detail ) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("member_user_id", "'473e1e2fs1b6'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/self/member-details/{member_user_id}"); String jsonBody = ...; // See request body example String result = Request .Put(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR_CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .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 "Content-Type": []string{"application/json"}, "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("PUT", "https://restapi.fax.plus/v3/accounts/self/member-details/{member_user_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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(); // Define array of request body. $request_body = ...; // See request body example try { $response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/self/member-details/{member_user_id}', array( 'headers' => $headers, 'json' => $request_body, ) ); 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 PUT https://restapi.fax.plus/v3/accounts/self/member-details/{member_user_id} \ -H 'Content-Type: application/json' \ -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"' ``` # Resend corporate member invitations Source: https://apidoc.fax.plus/api-reference/endpoints/accounts/resend-member-invitations patch /accounts/self/member-invitations Resend email invitations to users who have not yet signed up for your corporate account (maximum 10 per request). Only corporate admins with appropriate permissions can use this endpoint. (Permitted scopes: **fax:all:edit**, **fax:member:edit**) You can resend invitations to up to 10 users per request. If you need to resend to more users, make multiple requests. ```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 resendInvitations() { const emails = ["pending1@example.com", "pending2@example.com"]; const req = await AccountsApiFp(config).resendInvitations(emails); const resp = await req(axios); } resendInvitations() ``` ```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) emails = ["pending1@example.com", "pending2@example.com"] resp = api.resend_invitations(emails) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ String url = "https://restapi.fax.plus/v3/accounts/self/member-invitations"; String jsonBody = "[\"pending1@example.com\", \"pending2@example.com\"]"; String result = Request .Patch(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("Content-Type", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, ContentType.APPLICATION_JSON) .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"}, "Content-Type": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, "x-fax-clientid": []string{"YOUR_CLIENT_ID"} } jsonBody := []byte(`["pending1@example.com", "pending2@example.com"]`) data := bytes.NewBuffer(jsonBody) req, err := http.NewRequest("PATCH", "https://restapi.fax.plus/v3/accounts/self/member-invitations", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} 'application/json', 'Content-Type' => '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('PATCH','https://restapi.fax.plus/v3/accounts/self/member-invitations', array( 'headers' => $headers, 'json' => ["pending1@example.com", "pending2@example.com"], ) ); 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 PATCH https://restapi.fax.plus/v3/accounts/self/member-invitations \ -H 'Accept: application/json' \ -H 'Content-Type: 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"' \ -d '["pending1@example.com", "pending2@example.com"]' ``` # Get token information Source: https://apidoc.fax.plus/api-reference/endpoints/authentication/get-token-info get /auth/token Returns metadata about the current access token including type, scopes, expiration date, and PAT-specific information if applicable. For PAT tokens, returns full metadata (id, name, preview, created/expiration dates, last used). For OAuth tokens, returns token type and scopes only. ```js NodeJS SDK theme={null} const axios = require('axios'); const AuthenticationApiFp = require('@alohi/faxplus-api').AuthenticationApiFp; const Configuration = require('@alohi/faxplus-api').Configuration; const config = new Configuration({ accessToken: accessToken, basePath: 'https://restapi.fax.plus/v3' }); async function getTokenInfo() { const req = await AuthenticationApiFp(config).getTokenInfo(); const resp = await req(axios); console.log(resp.data); } getTokenInfo() ``` ```python Python SDK theme={null} from faxplus import ApiClient, AuthenticationApi from faxplus.configuration import Configuration conf = Configuration() conf.access_token = access_token api_client = ApiClient(configuration=conf) api = AuthenticationApi(api_client) resp = api.get_token_info() print(resp) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ String url = "https://restapi.fax.plus/v3/auth/token"; String result = Request .Get(url) .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{ "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"} } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://restapi.fax.plus/v3/auth/token", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} 'application/json', 'Authorization' => 'Bearer {access-token}' ); $client = new GuzzleHttp\Client(); try { $response = $client->request('GET','https://restapi.fax.plus/v3/auth/token', 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/auth/token \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' ``` # Assign contacts to groups Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/assign-contacts-to-groups post /accounts/self/contacts/assign-groups Assign multiple contacts to multiple groups. **Important:** This operation overwrites existing group assignments for the specified contacts - it does not append to them. Contacts will be unassigned from any group that's not included in this list (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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 associateContactGroups() { const associateData = { contact_id: 'contact_123', group_ids: ['group_456', 'group_789'] }; const req = await ContactsApiFp(config).associateContactGroups({ userId: 'self', body: associateData }); const resp = await req(axios); } associateContactGroups() ``` ```python Python SDK theme={null} 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) associate_data = { 'contact_id': 'contact_123', 'group_ids': ['group_456', 'group_789'] } resp = api.associate_contact_groups(user_id='self', body=associate_data) ``` ```bash cURL theme={null} curl -X POST https://restapi.fax.plus/v3/accounts/self/contacts/assign-groups \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' \ -d '{ "contact_id": "contact_123", "group_ids": ["group_456", "group_789"] }' ``` # Create a contact Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/create-contact post /accounts/self/contacts Create a new contact (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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', fax_number: '+12025551234', email: 'john@example.com', notes: 'Important client' }; const req = await ContactsApiFp(config).createContact({ userId: 'self', body: contactData }); const resp = await req(axios); } createContact() ``` ```python Python SDK theme={null} from faxplus import ApiClient, ContactsApi 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 = ContactsApi(api_client) contact_data = { 'name': 'John Doe', 'fax_number': '+12025551234', 'email': 'john@example.com', 'notes': 'Important client' } resp = api.create_contact(user_id='self', body=contact_data) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ String url = "https://restapi.fax.plus/v3/accounts/self/contacts"; String jsonBody = "{\"name\":\"John Doe\",\"fax_number\":\"+12025551234\",\"email\":\"john@example.com\",\"notes\":\"Important client\"}"; String result = Request .Post(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR_CLIENT_ID") .addHeader("Content-Type", "application/json") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, ContentType.APPLICATION_JSON) .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 "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, "x-fax-clientid": []string{"YOUR_CLIENT_ID"} } jsonBody := []byte(`{"name":"John Doe","fax_number":"+12025551234","email":"john@example.com","notes":"Important client"}`) data := bytes.NewBuffer(jsonBody) req, err := http.NewRequest("POST", "https://restapi.fax.plus/v3/accounts/self/contacts", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} 'application/json', '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(); $body = array( 'name' => 'John Doe', 'fax_number' => '+12025551234', 'email' => 'john@example.com', 'notes' => 'Important client' ); try { $response = $client->request('POST','https://restapi.fax.plus/v3/accounts/self/contacts', array( 'headers' => $headers, 'json' => $body, ) ); print_r($response->getBody()->getContents()); } catch (GuzzleHttp\Exception\BadResponseException $e) { // handle exception or api errors. print_r($e->getMessage()); } // ... ``` ```bash cURL theme={null} curl -X POST https://restapi.fax.plus/v3/accounts/self/contacts \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' \ -d '{ "name": "John Doe", "fax_number": "+12025551234", "email": "john@example.com", "notes": "Important client" }' ``` # Create a group Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/create-contact-group post /accounts/self/contact-groups Create a new contact group (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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 createContactGroup() { const groupData = { name: 'VIP Clients', description: 'Important customer group' }; const req = await ContactsApiFp(config).createContactGroup({ userId: 'self', body: groupData }); const resp = await req(axios); } createContactGroup() ``` ```python Python SDK theme={null} 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) group_data = { 'name': 'VIP Clients', 'description': 'Important customer group' } resp = api.create_contact_group(user_id='self', body=group_data) ``` ```bash cURL theme={null} curl -X POST https://restapi.fax.plus/v3/accounts/self/contact-groups \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' \ -d '{ "name": "VIP Clients", "description": "Important customer group" }' ``` # Delete a contact Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/delete-contact delete /accounts/self/contacts/{contact_id} Delete a contact (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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 deleteContact() { const req = await ContactsApiFp(config).deleteContact({ userId: 'self', contactId: 'contact_123' }); const resp = await req(axios); } deleteContact() ``` ```python Python SDK theme={null} 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) resp = api.delete_contact(user_id='self', contact_id='contact_123') ``` ```bash cURL theme={null} curl -X DELETE https://restapi.fax.plus/v3/accounts/self/contacts/contact_123 \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' ``` # Delete a group Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/delete-contact-group delete /accounts/self/contact-groups/{group_id} Delete a group (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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 deleteContactGroup() { const req = await ContactsApiFp(config).deleteContactGroup({ userId: 'self', groupId: 'group_123' }); const resp = await req(axios); } deleteContactGroup() ``` ```python Python SDK theme={null} 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) resp = api.delete_contact_group(user_id='self', group_id='group_123') ``` ```bash cURL theme={null} curl -X DELETE https://restapi.fax.plus/v3/accounts/self/contact-groups/group_123 \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' ``` # List contact groups Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/list-contact-groups get /accounts/self/contact-groups Get contact groups with optional search and pagination. You can also retrieve specific groups by providing comma-separated IDs (Permitted scopes: **fax:all:read**) ```js NodeJS SDK theme={null} 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 listContactGroups() { const req = await ContactsApiFp(config).listContactGroups({ userId: 'self', search: '', offset: 0, limit: 50 }); const resp = await req(axios); } listContactGroups() ``` ```python Python SDK theme={null} 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) resp = api.list_contact_groups(user_id='self', search='', offset=0, limit=50) ``` ```bash cURL theme={null} curl -X GET https://restapi.fax.plus/v3/accounts/self/contact-groups?search=&offset=0&limit=50 \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' ``` # List contacts Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/list-contacts get /accounts/self/contacts Get user contacts with optional filters, pagination, or retrieve specific contacts by IDs (Permitted scopes: **fax:all:read**) ```js NodeJS SDK theme={null} 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', name: '', faxNumber: '', offset: 0, limit: 50 }); const resp = await req(axios); } listContacts() ``` ```python Python SDK theme={null} from faxplus import ApiClient, ContactsApi 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 = ContactsApi(api_client) resp = api.list_contacts(user_id='self', name='', fax_number='', offset=0, limit=50) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ String url = "https://restapi.fax.plus/v3/accounts/self/contacts?offset=0&limit=50"; 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/self/contacts?offset=0&limit=50", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/self/contacts?offset=0&limit=50', 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/self/contacts?offset=0&limit=50 \ -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"' ``` # Share groups Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/share-contact-groups post /accounts/self/contact-groups/share Share groups with all corporate members (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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 shareContactGroups() { const shareData = { group_ids: ['group_123', 'group_456'], member_ids: ['member_789'] }; const req = await ContactsApiFp(config).shareContactGroups({ userId: 'self', body: shareData }); const resp = await req(axios); } shareContactGroups() ``` ```python Python SDK theme={null} 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) share_data = { 'group_ids': ['group_123', 'group_456'], 'member_ids': ['member_789'] } resp = api.share_contact_groups(user_id='self', body=share_data) ``` ```bash cURL theme={null} curl -X POST https://restapi.fax.plus/v3/accounts/self/contact-groups/share \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' \ -d '{ "group_ids": ["group_123", "group_456"], "member_ids": ["member_789"] }' ``` # Share contacts Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/share-contacts post /accounts/self/contacts/share Share contacts with all corporate members (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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 shareContacts() { const shareData = { contact_ids: ['contact_123', 'contact_456'], member_ids: ['member_789'] }; const req = await ContactsApiFp(config).shareContacts({ userId: 'self', body: shareData }); const resp = await req(axios); } shareContacts() ``` ```python Python SDK theme={null} 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) share_data = { 'contact_ids': ['contact_123', 'contact_456'], 'member_ids': ['member_789'] } resp = api.share_contacts(user_id='self', body=share_data) ``` ```bash cURL theme={null} curl -X POST https://restapi.fax.plus/v3/accounts/self/contacts/share \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' \ -d '{ "contact_ids": ["contact_123", "contact_456"], "member_ids": ["member_789"] }' ``` # Update a contact Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/update-contact put /accounts/self/contacts/{contact_id} Update an existing contact (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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() ``` ```python Python SDK theme={null} 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) ``` ```bash cURL theme={null} 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" }' ``` # Update a group Source: https://apidoc.fax.plus/api-reference/endpoints/contacts/update-contact-group put /accounts/self/contact-groups/{group_id} Update an existing group (Permitted scopes: **fax:all:edit**) ```js NodeJS SDK theme={null} 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 updateContactGroup() { const updateData = { name: 'Premium Clients', description: 'Updated group description' }; const req = await ContactsApiFp(config).updateContactGroup({ userId: 'self', groupId: 'group_123', body: updateData }); const resp = await req(axios); } updateContactGroup() ``` ```python Python SDK theme={null} 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': 'Premium Clients', 'description': 'Updated group description' } resp = api.update_contact_group(user_id='self', group_id='group_123', body=update_data) ``` ```bash cURL theme={null} curl -X PUT https://restapi.fax.plus/v3/accounts/self/contact-groups/group_123 \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: "YOUR_CLIENT_ID"' \ -d '{ "name": "Premium Clients", "description": "Updated group description" }' ``` # Create AI custom field definition Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/create-ai-custom-field post /accounts/self/ai/custom-fields Create a new custom field definition for AI field extraction. Admin-only. (Permitted scopes: **fax:all:edit**, **fax:ai_settings:edit**) # Delete AI custom field definition Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/delete-ai-custom-field delete /accounts/self/ai/custom-fields/{field_id} Delete a custom field definition. Admin-only. (Permitted scopes: **fax:all:edit**, **fax:ai_settings:edit**) # Get AI credit summary Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/get-ai-credits get /accounts/self/ai/credits Get the AI credit summary including remaining credits, usage breakdown by feature, and next reload date. (Permitted scopes: **fax:all:read**, **fax:ai:read**) # Get fax field extraction result Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/get-fax-ai-field-extraction get /accounts/{user_id}/faxes/{fax_id}/ai/field-extraction Get the field extraction processing status and extracted data for a fax. Returns status and extracted fields when processing is finished. (Permitted scopes: **fax:all:read**, **fax:ai:read**) # Get fax OCR result Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/get-fax-ai-ocr get /accounts/{user_id}/faxes/{fax_id}/ai/ocr Get the OCR processing status and extracted text for a fax. Returns status and text data when processing is finished. (Permitted scopes: **fax:all:read**, **fax:ai:read**) # Get fax AI settings Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/get-fax-ai-settings get /accounts/self/ai/settings Get fax AI auto-trigger settings for the organization. (Permitted scopes: **fax:all:read**, **fax:ai_settings:read**) # List AI custom field definitions Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/list-ai-custom-fields get /accounts/self/ai/custom-fields Get all custom field definitions for AI field extraction. (Permitted scopes: **fax:all:read**, **fax:ai_settings:read**) # Trigger fax field extraction Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/trigger-fax-ai-field-extraction post /accounts/{user_id}/faxes/{fax_id}/ai/field-extraction Trigger AI field extraction for a fax. Extracts structured data fields from the fax content. If extraction is already finished, returns the existing result. Consumes AI credits. (Permitted scopes: **fax:all:edit**, **fax:ai:edit**) # Trigger fax OCR Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/trigger-fax-ai-ocr post /accounts/{user_id}/faxes/{fax_id}/ai/ocr Trigger OCR processing for a fax. If OCR is already finished, returns the existing result. Consumes AI credits. (Permitted scopes: **fax:all:edit**, **fax:ai:edit**) # Update AI custom field definition Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/update-ai-custom-field patch /accounts/self/ai/custom-fields/{field_id} Update an existing custom field definition. Admin-only. (Permitted scopes: **fax:all:edit**, **fax:ai_settings:edit**) # Update extracted fields Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/update-fax-ai-field-extraction patch /accounts/{user_id}/faxes/{fax_id}/ai/field-extraction Update the extracted field data with user corrections. Only allowed when field extraction status is finished. (Permitted scopes: **fax:all:edit**, **fax:ai:edit**) # Update fax AI settings Source: https://apidoc.fax.plus/api-reference/endpoints/fax-ai/update-fax-ai-settings patch /accounts/self/ai/settings Update fax AI auto-trigger settings. Admin-only. Supports partial updates. (Permitted scopes: **fax:all:edit**, **fax:ai_settings:edit**) # Bulk delete fax records Source: https://apidoc.fax.plus/api-reference/endpoints/faxes/bulk-delete-fax-records delete /accounts/{user_id}/faxes Bulk delete multiple fax records. Maximum 50 fax IDs per request. Duplicate IDs are automatically ignored. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp; 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 bulkDeleteFaxes() { const reqParams = { "userId": "self", "ids": "a1b2c3d4e5f6789012345678901234ab,b2c3d4e5f6789012345678901234abc" }; const req = await FaxesApiFp(config).bulkDeleteFaxes(reqParams); const resp = await req(axios); } bulkDeleteFaxes(); ``` ```python Python SDK theme={null} from faxplus import ApiClient, FaxesApi 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 = FaxesApi(api_client) resp = api.bulk_delete_faxes( user_id="self", ids="a1b2c3d4e5f6789012345678901234ab,b2c3d4e5f6789012345678901234abc", ) ``` ```bash cURL theme={null} # You can also use wget curl -X DELETE "https://restapi.fax.plus/v3/accounts/self/faxes?ids=a1b2c3d4e5f6789012345678901234ab,b2c3d4e5f6789012345678901234abc" \ -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' ``` # Bulk update fax records Source: https://apidoc.fax.plus/api-reference/endpoints/faxes/bulk-update-fax-records put /accounts/{user_id}/faxes Bulk update multiple fax records (mark as read/unread and/or update comment). Maximum 100 fax IDs per request. Duplicate IDs are automatically ignored. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp; 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 bulkUpdateFaxes() { const reqParams = { "userId": "self", "bulkFaxUpdateRequest": { "ids": [ "a1b2c3d4e5f6789012345678901234ab", "b2c3d4e5f6789012345678901234abc" ], "is_read": true, "comment": "updated via bulk" } }; const req = await FaxesApiFp(config).bulkUpdateFaxes(reqParams); const resp = await req(axios); } bulkUpdateFaxes(); ``` ```python Python SDK theme={null} from faxplus import ApiClient, FaxesApi, BulkFaxUpdateRequest 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 = FaxesApi(api_client) payload = BulkFaxUpdateRequest( ids=[ "a1b2c3d4e5f6789012345678901234ab", "b2c3d4e5f6789012345678901234abc", ], is_read=True, comment="updated via bulk", ) resp = api.bulk_update_faxes(user_id="self", body=payload) ``` ```bash cURL theme={null} # You can also use wget curl -X PUT "https://restapi.fax.plus/v3/accounts/self/faxes" \ -H 'Content-Type: application/json' \ -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' \ -d '{ "ids": [ "a1b2c3d4e5f6789012345678901234ab", "b2c3d4e5f6789012345678901234abc" ], "is_read": true, "comment": "updated via bulk" }' ``` # Delete a fax Source: https://apidoc.fax.plus/api-reference/endpoints/faxes/delete-a-fax delete /accounts/{user_id}/faxes/{fax_id} Delete a specific fax record by providing its id. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp; 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 deleteFax() { const reqParams = { "userId": '13d8z73c', "faxId": '132esd4cs31' } const req = await FaxesApiFp(config).deleteFax(reqParams); const resp = await req(axios); } deleteFax() ``` ```python Python SDK theme={null} from faxplus import ApiClient, FaxesApi 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 = FaxesApi(api_client) api.delete_fax( user_id='13d8z73c', fax_id='132esd4cs31') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id}"); String result = Request .Delete(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("DELETE", "https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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('DELETE','https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id}', 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 DELETE https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id} \ -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"' ``` # Get a fax record Source: https://apidoc.fax.plus/api-reference/endpoints/faxes/get-a-fax-record get /accounts/{user_id}/faxes/{fax_id} Get a specific fax record details like duration, pages etc. (Permitted scopes: **fax:all:read**, **fax:fax:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp; 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 getFax() { const reqParams = { "userId": '13d8z73c', "faxId": '132esd4cs31' } const req = await FaxesApiFp(config).getFax(reqParams); const resp = await req(axios); } getFax() ``` ```python Python SDK theme={null} from faxplus import ApiClient, FaxesApi 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 = FaxesApi(api_client) resp = api.get_fax( user_id='13d8z73c', fax_id='132esd4cs31') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id}"); 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/{user_id}/faxes/{fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/faxes/{fax_id}', 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/{user_id}/faxes/{fax_id} \ -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"' ``` # List fax records Source: https://apidoc.fax.plus/api-reference/endpoints/faxes/list-fax-records get /accounts/{user_id}/faxes Get your own or your subordinate's faxes list. (Permitted scopes: **fax:all:read**, **fax:fax:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp; 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 listFaxes() { const reqParams = { "userId": '13d8z73c', "category": 'inbox', "after": '2018-01-01 00:00:00', "before": '2020-01-01 00:00:00', "limit": '50' } const req = await FaxesApiFp(config).listFaxes(reqParams); const resp = await req(axios); } listFaxes() ``` ```python Python SDK theme={null} from faxplus import ApiClient, FaxesApi 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 = FaxesApi(api_client) resp = api.list_faxes( user_id='13d8z73c', category='inbox', after='2018-01-01 00:00:00', before='2020-01-01 00:00:00', limit='50') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/faxes"); 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/{user_id}/faxes", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/faxes', 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/{user_id}/faxes \ -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"' ``` **Time range (`after` / `before`)**\ Both values are UTC (`YYYY-MM-DD HH:MM:SS`) and **exclusive**. To match a local calendar day, convert that day to a UTC window using the correct time zone (daylight-saving rules change the offset). **Pagination**\ Each call returns at most **50** records. The JSON body is `data.records` only; there is no `has_more` flag. If you receive 50 records, fetch the next page with `offset`, or use a narrower time window. Because `before` is exclusive, records that share the same second as your upper bound are omitted. **Categories (default: `inbox`)** * **inbox** — received faxes that completed or were only partly received; excludes deleted items and user-marked spam (unless you filter by `status`). * **sent** — outgoing faxes. * **spam** — spam faxes. **Web export vs API**\ CSV exports from the web app show **local** time. This API filters on **UTC**. Convert local days to UTC windows when reconciling with an export. # Modify fax record Source: https://apidoc.fax.plus/api-reference/endpoints/faxes/modify-fax-record put /accounts/{user_id}/faxes/{fax_id} You can modify a fax record's comment, its shared comment, or mark it as read. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp; 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 updateFax() { const reqParams = { "userId": '13d8z73c', "faxId": '132esd4cs31', "payloadFaxModification": undefined } const req = await FaxesApiFp(config).updateFax(reqParams); const resp = await req(axios); } updateFax() ``` ```python Python SDK theme={null} from faxplus import ApiClient, FaxesApi, PayloadFaxModification from faxplus.configuration import Configuration payload_fax_modification = PayloadFaxModification() 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 = FaxesApi(api_client) api.update_fax( user_id='13d8z73c', fax_id='132esd4cs31', body=payload_fax_modification ) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id}"); String jsonBody = ...; // See request body example String result = Request .Put(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR_CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .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 "Content-Type": []string{"application/json"}, "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("PUT", "https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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(); // Define array of request body. $request_body = ...; // See request body example try { $response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id}', array( 'headers' => $headers, 'json' => $request_body, ) ); 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 PUT https://restapi.fax.plus/v3/accounts/{user_id}/faxes/{fax_id} \ -H 'Content-Type: application/json' \ -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"' ``` # Download fax file Source: https://apidoc.fax.plus/api-reference/endpoints/files/download-fax-file get /accounts/{user_id}/files/{fax_id} Download sent or received fax file. (Permitted scopes: **fax:all:read**, **fax:file:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp; 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 getFile() { const reqParams = { "userId": '13d8z73c', "faxId": '132esd4cs31', "format": 'tiff' } const req = await FilesApiFp(config).getFile(reqParams); const resp = await req(axios); } getFile() ``` ```python Python SDK theme={null} from faxplus import ApiClient, FilesApi 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 = FilesApi(api_client) resp = api.get_file( user_id='13d8z73c', fax_id='132esd4cs31', format='tiff') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/files/{fax_id}"); 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/pdf'") .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/pdf"}, "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/{user_id}/files/{fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/files/{fax_id}', 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/{user_id}/files/{fax_id} \ -H 'Accept: application/pdf' \ -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"' ``` # Download single fax page Source: https://apidoc.fax.plus/api-reference/endpoints/files/download-fax-file-page get /accounts/{user_id}/files/{fax_id}/page/{page_num} Download single page (starting with 1) of a sent or received fax file. (Permitted scopes: **fax:all:read**, **fax:file:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp; 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 getFilePage() { const reqParams = { "userId": '13d8z73c', "faxId": '132esd4cs31', "format": 'tiff', "pageNum": 1 } const req = await FilesApiFp(config).getFilePage(reqParams); const resp = await req(axios); } getFilePage() ``` ```python Python SDK theme={null} from faxplus import ApiClient, FilesApi 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 = FilesApi(api_client) resp = api.get_file_page( user_id='13d8z73c', fax_id='132esd4cs31', format='tiff', page_num=1 ) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("fax_id", "'132esd4cs31'"); pathParams.put("page_num", "'1'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/files/{fax_id}/page/{page_num}"); 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/pdf'") .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/pdf"}, "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/{user_id}/files/{fax_id}/page/{page_num}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/files/{fax_id}/page/{page_num}', 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/{user_id}/files/{fax_id}/page/{page_num} \ -H 'Accept: application/pdf' \ -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"' ``` # Get fax confirmation report Source: https://apidoc.fax.plus/api-reference/endpoints/files/get-fax-confirmation-report get /accounts/{user_id}/report/{fax_id} Retrieve fax confirmation report (Permitted scopes: **fax:all:read**, **fax:fax:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp; 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 getFaxReport() { const reqParams = { "userId": '13d8z73c', "faxId": '132esd4cs31' } const req = await FilesApiFp(config).getFaxReport(reqParams); const resp = await req(axios); } getFaxReport() ``` ```python Python SDK theme={null} from faxplus import ApiClient, FilesApi 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 = FilesApi(api_client) resp = api.get_fax_report( user_id='13d8z73c', fax_id='132esd4cs31') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}"); 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/pdf'") .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/pdf"}, "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/{user_id}/report/{fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/report/{fax_id}', 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/{user_id}/report/{fax_id} \ -H 'Accept: application/pdf' \ -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"' ``` # Get fax thumbnail Source: https://apidoc.fax.plus/api-reference/endpoints/files/get-fax-thumbnail get /accounts/{user_id}/thumbnail/{fax_id} Retrieve fax thumbnail (Permitted scopes: **fax:all:read**, **fax:fax:read**) # Upload a file Source: https://apidoc.fax.plus/api-reference/endpoints/files/upload-a-file post /accounts/{user_id}/files Before sending a fax you need to upload your files using this API. In order to upload your fax file, you have to send a `multipart/form-data` request with your file. Set the `name` to `fax_file`, `filename` to your file's name with extension, and the Content-Type to the file's MIME type. In most cases, the `filename` directive will be automatically added by your library of choice. If the upload was successful you would receive a `file_path` which you can use to send your fax. (Permitted scopes: **fax:all:edit**, **fax:file:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const fs = require('fs'); const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp; 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 uploadFile() { // IMPORTANT: fs.createReadStream() requires a local file system path. // It does NOT support URLs or remote streams. // // If your file is stored remotely (e.g., AWS S3, Google Cloud Storage, or HTTP URL), // you must first download it to a local path or load it into memory as a Blob. const reqParams = { "userId": '13d8z73c', "faxFile": fs.createReadStream(FILE_PATH) // FILE_PATH must be a local file path } const req = await FilesApiFp(config).uploadFile(reqParams); const resp = await req(axios); } uploadFile() ``` ```python Python SDK theme={null} from faxplus import ApiClient, FilesApi 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 = FilesApi(api_client) resp = api.upload_file( user_id='13d8z73c', fax_file='/path/to/file.pdf' ) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/files"); HttpEntity entity = MultipartEntityBuilder.create() .setMode(HttpMultipartMode.BROWSER_COMPATIBLE) .setCharset(Charset.forName(CHARSET)) .addBinaryBody("fax_file", bytes, ContentType.MULTIPART_FORM_DATA, "fax.pdf") .build(); String result = Request .Post(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR CLIENT_ID") .addHeader("Content-Type", "'multipart/form-data'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .body(entity) .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 "Content-Type": []string{"multipart/form-data"}, "Accept": []string{"application/json"}, "Authorization": []string{"Bearer {access-token}"}, "x-fax-clientid": []string{"YOUR CLIENT_ID"} } body := &bytes.Buffer{} writer := multipart.NewWriter(body) fax_file_part, err := writer.CreateFormFile('fax_file', filepath.Base('fax.pdf')) _, err = io.Copy(part, file) req, err := http.NewRequest("POST", "https://restapi.fax.plus/v3/accounts/{user_id}/files", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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('POST','https://restapi.fax.plus/v3/accounts/{user_id}/files', array( 'headers' => $headers, 'multipart' => [ [ 'name' => 'fax_file', 'contents' => fopen('fax.pdf', 'r') ], ],) ); 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 POST https://restapi.fax.plus/v3/accounts/{user_id}/files \ -H 'Content-Type: multipart/form-data' \ -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"' \ -F 'fax_file=@fax.pdf' ``` # Assign number Source: https://apidoc.fax.plus/api-reference/endpoints/numbers/assign-number put /accounts/{user_id}/numbers/{number} Assign fax number to a corporate member (Permitted scopes: **fax:all:edit**, **fax:numbers:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const NumbersApiFp = require('@alohi/faxplus-api').NumbersApiFp; 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 updateNumber() { const reqParams = { "userId": '23415ufasx8df7', "number": '+123417543010', "payloadNumberModification": undefined } const req = await NumbersApiFp(config).updateNumber(reqParams); const resp = await req(axios); } updateNumber() ``` ```python Python SDK theme={null} from faxplus import ApiClient, NumbersApi, PayloadNumberModification from faxplus.configuration import Configuration payload_number_modification = PayloadNumberModification() 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 = NumbersApi(api_client) api.update_number( user_id='23415ufasx8df7', number='+123417543010', body=payload_number_modification ) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'23415ufasx8df7'"); pathParams.put("number", "'+123417543010'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number}"); String jsonBody = ...; // See request body example String result = Request .Put(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .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 "Content-Type": []string{"application/json"}, "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("PUT", "https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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(); // Define array of request body. $request_body = ...; // See request body example try { $response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number}', array( 'headers' => $headers, 'json' => $request_body, ) ); 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 PUT https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number} \ -H 'Content-Type: application/json' \ -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"' ``` # Get number information Source: https://apidoc.fax.plus/api-reference/endpoints/numbers/get-number-information get /accounts/{user_id}/numbers/{number} Get information about a single purchased/assigned fax number (Permitted scopes: **fax:all:read**, **fax:numbers:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const NumbersApiFp = require('@alohi/faxplus-api').NumbersApiFp; 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 getNumber() { const reqParams = { "userId": '23415ufasx8df7', "number": '+123417543010' } const req = await NumbersApiFp(config).getNumber(reqParams); const resp = await req(axios); } getNumber() ``` ```python Python SDK theme={null} from faxplus import ApiClient, NumbersApi 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 = NumbersApi(api_client) resp = api.get_number( user_id='23415ufasx8df7', number='+123417543010') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'23415ufasx8df7'"); pathParams.put("number", "'+123417543010'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number}"); 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/{user_id}/numbers/{number}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/numbers/{number}', 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/{user_id}/numbers/{number} \ -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"' ``` # List phone numbers Source: https://apidoc.fax.plus/api-reference/endpoints/numbers/list-phone-numbers get /accounts/{user_id}/numbers List your purchased/assigned phone numbers. For corporate members all assigned numbers will be returned, while for the corporate admin, all purchased numbers. (Permitted scopes: **fax:all:read**, **fax:numbers:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const NumbersApiFp = require('@alohi/faxplus-api').NumbersApiFp; 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 listNumbers() { const reqParams = { "userId": '23415ufasx8df7' } const req = await NumbersApiFp(config).listNumbers(reqParams); const resp = await req(axios); } listNumbers() ``` ```python Python SDK theme={null} from faxplus import ApiClient, NumbersApi 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 = NumbersApi(api_client) resp = api.list_numbers( user_id='23415ufasx8df7') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'23415ufasx8df7'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/numbers"); 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/{user_id}/numbers", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/numbers', 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/{user_id}/numbers \ -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"' ``` # Revoke number Source: https://apidoc.fax.plus/api-reference/endpoints/numbers/revoke-number delete /accounts/{user_id}/numbers/{number} Revoke fax number from a corporate member. To revoke your own number use self as a user_id. (Permitted scopes: **fax:all:edit**, **fax:numbers:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const NumbersApiFp = require('@alohi/faxplus-api').NumbersApiFp; 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 revokeNumber() { const reqParams = { "userId": '23415ufasx8df7', "number": '+123417543010' } const req = await NumbersApiFp(config).revokeNumber(reqParams); const resp = await req(axios); } revokeNumber() ``` ```python Python SDK theme={null} from faxplus import ApiClient, NumbersApi 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 = NumbersApi(api_client) api.revoke_number( user_id='23415ufasx8df7', number='+123417543010') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'23415ufasx8df7'"); pathParams.put("number", "'+123417543010'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number}"); String result = Request .Delete(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("DELETE", "https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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('DELETE','https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number}', 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 DELETE https://restapi.fax.plus/v3/accounts/{user_id}/numbers/{number} \ -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"' ``` # Bulk delete outbox faxes Source: https://apidoc.fax.plus/api-reference/endpoints/outbox/bulk-delete-outbox-faxes delete /accounts/{user_id}/outbox Bulk delete (cancel) multiple outbox fax records. Maximum 10 outbox fax IDs per request. Duplicate IDs are automatically ignored. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp; 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 bulkDeleteOutboxFaxes() { const reqParams = { "userId": "self", "ids": "a1b2c3d4e5f6789012345678901234ab,b2c3d4e5f6789012345678901234abc" }; const req = await OutboxApiFp(config).bulkDeleteOutboxFaxes(reqParams); const resp = await req(axios); } bulkDeleteOutboxFaxes(); ``` ```python Python SDK theme={null} from faxplus import ApiClient, OutboxApi 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 = OutboxApi(api_client) resp = api.bulk_delete_outbox_faxes( user_id="self", ids="a1b2c3d4e5f6789012345678901234ab,b2c3d4e5f6789012345678901234abc", ) ``` ```bash cURL theme={null} # You can also use wget curl -X DELETE "https://restapi.fax.plus/v3/accounts/self/outbox?ids=a1b2c3d4e5f6789012345678901234ab,b2c3d4e5f6789012345678901234abc" \ -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' ``` # Bulk update outbox faxes Source: https://apidoc.fax.plus/api-reference/endpoints/outbox/bulk-update-outbox-faxes put /accounts/{user_id}/outbox Bulk update multiple outbox fax records (update comment). Maximum 100 outbox fax IDs per request. Duplicate IDs are automatically ignored. Jobs in 'sending' status cannot be updated and will return a 409 status code. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp; 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 bulkUpdateOutboxFaxes() { const reqParams = { "userId": "self", "bulkOutboxUpdateRequest": { "ids": [ "a1b2c3d4e5f6789012345678901234ab", "b2c3d4e5f6789012345678901234abc" ], "comment": "updated via bulk" } }; const req = await OutboxApiFp(config).bulkUpdateOutboxFaxes(reqParams); const resp = await req(axios); } bulkUpdateOutboxFaxes(); ``` ```python Python SDK theme={null} from faxplus import ApiClient, OutboxApi, BulkOutboxUpdateRequest 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 = OutboxApi(api_client) payload = BulkOutboxUpdateRequest( ids=[ "a1b2c3d4e5f6789012345678901234ab", "b2c3d4e5f6789012345678901234abc", ], comment="updated via bulk", ) resp = api.bulk_update_outbox_faxes(user_id="self", body=payload) ``` ```bash cURL theme={null} # You can also use wget curl -X PUT "https://restapi.fax.plus/v3/accounts/self/outbox" \ -H 'Content-Type: application/json' \ -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' \ -d '{ "ids": [ "a1b2c3d4e5f6789012345678901234ab", "b2c3d4e5f6789012345678901234abc" ], "comment": "updated via bulk" }' ``` # Delete an outgoing fax Source: https://apidoc.fax.plus/api-reference/endpoints/outbox/delete-an-outgoing-fax delete /accounts/{user_id}/outbox/{outbox_fax_id} Delete an outgoing fax that is being scheduled for sending. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp; 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 deleteOutboxFax() { const reqParams = { "userId": '13d8z73c', "outboxFaxId": '132esd4cs31' } const req = await OutboxApiFp(config).deleteOutboxFax(reqParams); const resp = await req(axios); } deleteOutboxFax() ``` ```python Python SDK theme={null} from faxplus import ApiClient, OutboxApi 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 = OutboxApi(api_client) api.delete_outbox_fax( user_id='13d8z73c', outbox_fax_id='132esd4cs31') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("outbox_fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}"); String result = Request .Delete(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("DELETE", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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('DELETE','https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}', 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 DELETE https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id} \ -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"' ``` # List faxes in the outbox Source: https://apidoc.fax.plus/api-reference/endpoints/outbox/list-faxes-in-the-outbox get /accounts/{user_id}/outbox Get a list of the faxes in the outbox which were not yet sent. (Permitted scopes: **fax:all:read**, **fax:fax:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp; 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 listOutboxFaxes() { const reqParams = { "userId": '13d8z73c' } const req = await OutboxApiFp(config).listOutboxFaxes(reqParams); const resp = await req(axios); } listOutboxFaxes() ``` ```python Python SDK theme={null} from faxplus import ApiClient, OutboxApi 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 = OutboxApi(api_client) resp = api.list_outbox_faxes( user_id='13d8z73c') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox"); 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/{user_id}/outbox", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/outbox', 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/{user_id}/outbox \ -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"' ``` # Get outgoing fax Source: https://apidoc.fax.plus/api-reference/endpoints/outbox/list-outgoing-faxes get /accounts/{user_id}/outbox/{outbox_fax_id} Get specific details of a fax currently scheduled for sending. (Permitted scopes: **fax:all:read**, **fax:fax:read**) ```js NodeJS SDK theme={null} const axios = require('axios'); const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp; 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 getOutboxFax() { const reqParams = { "userId": '13d8z73c', "outboxFaxId": '132esd4cs31' } const req = await OutboxApiFp(config).getOutboxFax(reqParams); const resp = await req(axios); } getOutboxFax() ``` ```python Python SDK theme={null} from faxplus import ApiClient, OutboxApi 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 = OutboxApi(api_client) resp = api.get_outbox_fax( user_id='13d8z73c', outbox_fax_id='132esd4cs31') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("outbox_fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}"); 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/{user_id}/outbox/{outbox_fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/{user_id}/outbox/{outbox_fax_id}', 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/{user_id}/outbox/{outbox_fax_id} \ -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"' ``` # Modify an outgoing fax Source: https://apidoc.fax.plus/api-reference/endpoints/outbox/modify-an-outgoing-fax put /accounts/{user_id}/outbox/{outbox_fax_id} Modify an outgoing fax that is being scheduled for sending. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**) ```js NodeJS SDK theme={null} const axios = require('axios'); const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp; 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 updateOutboxFax() { const reqParams = { "userId": '13d8z73c', "outboxFaxId": '132esd4cs31', "payloadOutboxModification": undefined } const req = await OutboxApiFp(config).updateOutboxFax(reqParams); const resp = await req(axios); } updateOutboxFax() ``` ```python Python SDK theme={null} from faxplus import ApiClient, OutboxApi, PayloadOutboxModification from faxplus.configuration import Configuration payload_outbox_modification = PayloadOutboxModification() 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 = OutboxApi(api_client) api.update_outbox_fax( user_id='13d8z73c', outbox_fax_id='132esd4cs31', body=payload_outbox_modification ) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("outbox_fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}"); String jsonBody = ...; // See request body example String result = Request .Put(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .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 "Content-Type": []string{"application/json"}, "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("PUT", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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(); // Define array of request body. $request_body = ...; // See request body example try { $response = $client->request('PUT','https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id}', array( 'headers' => $headers, 'json' => $request_body, ) ); 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 PUT https://restapi.fax.plus/v3/accounts/{user_id}/outbox/{outbox_fax_id} \ -H 'Content-Type: application/json' \ -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"' ``` # Send a fax Source: https://apidoc.fax.plus/api-reference/endpoints/outbox/send-a-fax post /accounts/{user_id}/outbox Send a fax to one or more destinations. For corporate members without a fax number assigned set the 'from' parameter to 'no_number'. (Permitted scopes: **fax:all:edit**, **fax:fax:edit**). To randomly select one of the available numbers per recipient, use comma-separated string. You can reuse files from existing faxes using the `from_fax` parameter instead of uploading files again. This is perfect for: * **Resending** a fax that failed or needs to go to the same destination * **Forwarding** a received fax to new recipients * **Combining** by sending both uploaded files and an existing fax file together (uploaded files are sent first, followed by the file from `from_fax`) Set `options.enhancement: false` when resending to preserve the original quality. ```js NodeJS SDK theme={null} const axios = require('axios'); const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp; 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 sendFax() { const reqParams = { "userId": '13d8z73c', "payloadOutbox": { "comment": { "tags": [ "tag1", "tag2" ], "text": "text comment" }, "files": [ "filetosend.pdf" ], "from": "+12345667", "options": { "enhancement": true, "retry": { "count": 2, "delay": 15 } }, "send_time": "2000-01-01 01:02:03 +0000", "to": [ "+12345688", "+12345699" ], "return_ids": true } } const req = await OutboxApiFp(config).sendFax(reqParams); const resp = await req(axios); } sendFax() ``` ```python Python SDK theme={null} from faxplus import ApiClient, OutboxApi, OutboxComment, RetryOptions, OutboxOptions, OutboxCoverPage, PayloadOutbox, PayloadOutboxFromFax from faxplus.configuration import Configuration outbox_comment = OutboxComment(tags=['tag1', 'tag2'], text='text comment') retry_options = RetryOptions(count=2, delay=15) outbox_options = OutboxOptions(enhancement=True, retry=retry_options) outbox_cover_page = OutboxCoverPage(include_company_logo=True) # Option 1: Send with uploaded files payload_outbox = PayloadOutbox( from_number='+12345667', to=['+12345688', '+12345699'], files=['filetosend.pdf'], comment=outbox_comment, options=outbox_options, send_time='2000-01-01 01:02:03 +0000', return_ids=True, cover_page=outbox_cover_page ) # Option 2: Resend an existing fax (no file upload needed) payload_resend = PayloadOutbox( from_number='+12345667', to=['+12025559876'], from_fax=PayloadOutboxFromFax(fax_id='abc123def456') ) # Option 3: Combine uploaded files + existing fax (files go first) payload_combined = PayloadOutbox( from_number='+12345667', to=['+12345688'], files=['cover-letter.pdf'], from_fax=PayloadOutboxFromFax(fax_id='abc123def456'), options=OutboxOptions(enhancement=False) # Preserve quality ) 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 = OutboxApi(api_client) resp = api.send_fax(user_id='13d8z73c', body=payload_outbox) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox"); String jsonBody = ...; // See request body example String result = Request .Post(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .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 "Content-Type": []string{"application/json"}, "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("POST", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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(); // Define array of request body. $request_body = ...; // See request body example try { $response = $client->request('POST','https://restapi.fax.plus/v3/accounts/{user_id}/outbox', array( 'headers' => $headers, 'json' => $request_body, ) ); print_r($response->getBody()->getContents()); } catch (GuzzleHttp\Exception\BadResponseException $e) { // handle exception or api errors. print_r($e->getMessage()); } // ... ``` ```bash cURL theme={null} # Send with uploaded files curl -X POST https://restapi.fax.plus/v3/accounts/{user_id}/outbox \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: YOUR_CLIENT_ID' \ -d '{ "from": "+12345667", "to": ["+12345688", "+12345699"], "files": ["filetosend.pdf"], "comment": {"text": "text comment", "tags": ["tag1", "tag2"]}, "options": {"enhancement": true, "retry": {"count": 2, "delay": 15}}, "return_ids": true }' # Resend an existing fax (no file upload) curl -X POST https://restapi.fax.plus/v3/accounts/self/outbox \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: YOUR_CLIENT_ID' \ -d '{ "from": "+12345667", "to": ["+12025559876"], "from_fax": {"fax_id": "abc123def456"} }' # Combine uploaded files + existing fax curl -X POST https://restapi.fax.plus/v3/accounts/self/outbox \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -H 'x-fax-clientid: YOUR_CLIENT_ID' \ -d '{ "from": "+12345667", "to": ["+12345688"], "files": ["cover-letter.pdf"], "from_fax": {"fax_id": "abc123def456"}, "options": {"enhancement": false} }' ``` # Create a webhook endpoint Source: https://apidoc.fax.plus/api-reference/endpoints/webhooks/create-webhook-endpoint post /webhooks Create a webhook endpoint. `url` and `filter_types` (min 1) are required. Returns 201 with an empty body. Requires webhooks to be enabled in Integrations. (Permitted scopes: **fax:all:edit**, **fax:webhook:edit**) `url` and `filter_types` are required (`filter_types` must have at least one event). Create returns **201** with an empty body — [list endpoints](/api-reference/endpoints/webhooks/list-webhook-endpoints) to read the `ep_…` id. ```bash cURL theme={null} curl -X POST https://restapi.fax.plus/v3/webhooks \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -d '{ "url": "https://example.com/fax-webhooks", "filter_types": ["fax_sent", "fax_received"], "channels": ["+12135550123"] }' ``` ```python Python theme={null} import requests resp = requests.post( "https://restapi.fax.plus/v3/webhooks", headers={"Authorization": "Bearer {access-token}", "Content-Type": "application/json"}, json={ "url": "https://example.com/fax-webhooks", "filter_types": ["fax_sent", "fax_received"], "channels": ["+12135550123"], }, ) print(resp.status_code) ``` ```json 201 theme={null} {} ``` ```json 400 theme={null} { "error": "bad_request", "description": "Invalid number: not-a-number" } ``` ```json 403 theme={null} { "error": "plan_not_eligible" } ``` ```json 404 theme={null} { "error": "bad_request", "description": "application not found, enable webhooks in Fax.Plus integrations settings" } ``` ```json 500 theme={null} { "error": "server_error", "description": "server_error" } ``` # Delete webhook (Legacy) Source: https://apidoc.fax.plus/api-reference/endpoints/webhooks/delete-webhook delete /hooks/{hook_id} **Legacy** `DELETE /hooks/{hook_id}`. Prefer `DELETE /webhooks/{endpoint_id}`. Delete a webhook by its ID. (Permitted scopes: **fax:all:edit**, **fax:webhook:edit**) Legacy `/v3/hooks` API. These webhooks will be decommissioned soon. To delete a current endpoint, use [Delete a webhook endpoint](/api-reference/endpoints/webhooks/delete-webhook-endpoint) (`DELETE /v3/webhooks/{endpoint_id}`). ```js NodeJS SDK theme={null} const axios = require('axios'); const WebhooksApiFp = require('@alohi/faxplus-api').WebhooksApiFp; 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 deleteWebhook() { const reqParams = { "hookId": '4d5331f94a00460d811c2f2ac64ae20b' } const req = await WebhooksApiFp(config).deleteWebhook(reqParams); const resp = await req(axios); } deleteWebhook() ``` ```python Python SDK theme={null} from faxplus import ApiClient, WebhooksApi 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 = WebhooksApi(api_client) api.delete_webhook( hook_id='4d5331f94a00460d811c2f2ac64ae20b') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("hook_id", "'4d5331f94a00460d811c2f2ac64ae20b'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/hooks/{hook_id}"); String result = Request .Delete(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("DELETE", "https://restapi.fax.plus/v3/hooks/{hook_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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('DELETE','https://restapi.fax.plus/v3/hooks/{hook_id}', 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 DELETE https://restapi.fax.plus/v3/hooks/{hook_id} \ -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"' ``` # Delete a webhook endpoint Source: https://apidoc.fax.plus/api-reference/endpoints/webhooks/delete-webhook-endpoint delete /webhooks/{endpoint_id} Delete a webhook endpoint by its ID. (Permitted scopes: **fax:all:edit**, **fax:webhook:edit**) Deletes a `/v3/webhooks` endpoint (`ep_…`). To delete a legacy hook, use [Delete webhook (Legacy)](/api-reference/endpoints/webhooks/delete-webhook). ```bash cURL theme={null} curl -X DELETE https://restapi.fax.plus/v3/webhooks/{endpoint_id} \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' ``` ```python Python theme={null} import requests resp = requests.delete( "https://restapi.fax.plus/v3/webhooks/{endpoint_id}", headers={"Authorization": "Bearer {access-token}", "Accept": "application/json"}, ) print(resp.status_code) ``` ```json 200 theme={null} {} ``` ```json 400 theme={null} { "error": "bad_request", "description": "hook_id_required" } ``` ```json 403 theme={null} { "error": "plan_not_eligible" } ``` ```json 404 theme={null} { "error": "bad_request", "description": "hook_not_found" } ``` ```json 500 theme={null} { "error": "server_error", "description": "server_error" } ``` # List user webhooks (Legacy) Source: https://apidoc.fax.plus/api-reference/endpoints/webhooks/list-user-webhooks get /hooks **Legacy** `GET /hooks`. Prefer `GET /webhooks`. Returns a list of currently registered webhooks for the requested **event**. (Permitted scopes: **fax:all:read**, **fax:webhook:read**) Legacy `/v3/hooks` API. These webhooks will be decommissioned soon. New integrations should use [List webhook endpoints](/api-reference/endpoints/webhooks/list-webhook-endpoints) (`GET /v3/webhooks`). ```js NodeJS SDK theme={null} const axios = require('axios'); const WebhooksApiFp = require('@alohi/faxplus-api').WebhooksApiFp; 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 getWebhooks() { const reqParams = { "event": 'fax_received' } const req = await WebhooksApiFp(config).getWebhooks(reqParams); const resp = await req(axios); } getWebhooks() ``` ```python Python SDK theme={null} from faxplus import ApiClient, WebhooksApi 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 = WebhooksApi(api_client) resp = api.get_webhooks( event='fax_received') ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ String url = "https://restapi.fax.plus/v3/hooks?event=fax_received"; 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/hooks", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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/hooks', 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/hooks?event=fax_received \ -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"' ``` # List webhook endpoints Source: https://apidoc.fax.plus/api-reference/endpoints/webhooks/list-webhook-endpoints get /webhooks List webhook endpoints for this account. Optional `event` filter uses names (`fax_received`). Requires webhooks to be enabled in Integrations. (Permitted scopes: **fax:all:read**, **fax:webhook:read**) Current webhook API. Requires webhooks enabled in [Integrations](https://app.fax.plus/profile/integrations). For the older one-event-per-hook API, see [List user webhooks (Legacy)](/api-reference/endpoints/webhooks/list-user-webhooks). ```bash cURL theme={null} curl -X GET 'https://restapi.fax.plus/v3/webhooks?event=fax_received&limit=50' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' ``` ```python Python theme={null} import requests resp = requests.get( "https://restapi.fax.plus/v3/webhooks", params={"event": "fax_received", "limit": 50}, headers={"Authorization": "Bearer {access-token}", "Accept": "application/json"}, ) print(resp.json()) ``` ```json 200 theme={null} { "data": [ { "id": "ep_33ZIBDmz66FcPG35FnsbM6Ie4X1", "url": "https://example.com/fax-webhooks", "description": "Sales inbox", "filter_types": ["fax_sent", "fax_received"], "channels": ["+12135550123"], "disabled": false, "created_at": "2026-08-31T15:11:00Z", "updated_at": "2026-08-31T15:11:00Z" } ], "next": null } ``` ```json 400 theme={null} { "error": "bad_request", "description": "invalid_limit" } ``` ```json 403 theme={null} { "error": "plan_not_eligible" } ``` ```json 404 theme={null} { "error": "bad_request", "description": "application not found, enable webhooks in Fax.Plus integrations settings" } ``` ```json 500 theme={null} { "error": "server_error", "description": "server_error" } ``` # Register new webhook (Legacy) Source: https://apidoc.fax.plus/api-reference/endpoints/webhooks/register-new-webhook post /hooks **Legacy** `POST /hooks`. Prefer `POST /webhooks`. Register a new webhook which will be called on a specific event. See the WebhookCallback model. (Permitted scopes: **fax:all:edit**, **fax:webhook:edit**) Legacy `/v3/hooks` API. These webhooks will be decommissioned soon. New integrations should use [Create a webhook endpoint](/api-reference/endpoints/webhooks/create-webhook-endpoint) (`POST /v3/webhooks`). ```js NodeJS SDK theme={null} const axios = require('axios'); const WebhooksApiFp = require('@alohi/faxplus-api').WebhooksApiFp; 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 createWebhook() { const reqParams = { "webhook": { "target": "http://myapp.com/fax_received", "event": "fax_received" } } const req = await WebhooksApiFp(config).createWebhook(reqParams); const resp = await req(axios); } createWebhook() ``` ```python Python SDK theme={null} from faxplus import ApiClient, WebhooksApi, Webhook from faxplus.configuration import Configuration webhook = Webhook(target='http://myapp.com/fax_received', event='fax_received') 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 = WebhooksApi(api_client) resp = api.create_webhook(body=webhook) ``` ```java Java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ String url = "https://restapi.fax.plus/v3/hooks"; String jsonBody = ...; // See request body example String result = Request .Post(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR_CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .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 "Content-Type": []string{"application/json"}, "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("POST", "https://restapi.fax.plus/v3/hooks", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php PHP theme={null} '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(); // Define array of request body. $request_body = ...; // See request body example try { $response = $client->request('POST','https://restapi.fax.plus/v3/hooks', array( 'headers' => $headers, 'json' => $request_body, ) ); 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 POST https://restapi.fax.plus/v3/hooks \ -H 'Content-Type: application/json' \ -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"' ``` # Update a webhook endpoint Source: https://apidoc.fax.plus/api-reference/endpoints/webhooks/update-webhook-endpoint patch /webhooks/{endpoint_id} Partially update a webhook endpoint. Omitted fields stay unchanged; `channels: null` clears number filters. (Permitted scopes: **fax:all:edit**, **fax:webhook:edit**) Partial update. Omitted fields stay unchanged. Send `"channels": null` to clear number filters. ```bash cURL theme={null} curl -X PATCH https://restapi.fax.plus/v3/webhooks/{endpoint_id} \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}' \ -d '{ "url": "https://example.com/fax-webhooks", "filter_types": ["fax_sent"], "channels": null }' ``` ```python Python theme={null} import requests resp = requests.patch( "https://restapi.fax.plus/v3/webhooks/{endpoint_id}", headers={"Authorization": "Bearer {access-token}", "Content-Type": "application/json"}, json={"url": "https://example.com/fax-webhooks", "channels": None}, ) print(resp.status_code) ``` ```json 200 theme={null} {} ``` ```json 400 theme={null} { "error": "bad_request", "description": "Invalid phone number: not-a-number" } ``` ```json 403 theme={null} { "error": "plan_not_eligible" } ``` ```json 404 theme={null} { "error": "bad_request", "description": "hook_not_found" } ``` ```json 500 theme={null} { "error": "server_error", "description": "server_error" } ``` # Javascript Source: https://apidoc.fax.plus/backend-sdks/javascript Install the Fax.Plus Javascript SDK package ```bash theme={null} // with npm npm install @alohi/faxplus-api // with yarn yarn add @alohi/faxplus-api ``` Getting Started ```javascript theme={null} const axios = require('axios'); const Configuration = require('@alohi/faxplus-api').Configuration; const FaxesApiFp = require('@alohi/faxplus-api').FaxesApiFp; const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp; const accessToken = "YOUR_ACCESS_TOKEN" const configuration = new Configuration({ accessToken: accessToken, basePath: 'https://restapi.fax.plus/v3', }); // Get the first entry in the corporate member's inbox const request = await FaxesApiFp(configuration).listFaxes({userId: "self"}); const response = await request(axios); const cdrId = response.data.data.records[0].id; // Upload file const request = await FilesApiFp(configuration).uploadFile("self", fs.createReadStream("./test/sample.pdf") ); const response = await request(axios); // Send fax ``` # Python Source: https://apidoc.fax.plus/backend-sdks/python To install the package using PyPi or Github, you can use the following command: ```bash theme={null} # From PyPi pip install faxplus-api # Directly from Github pip install git+https://github.com/alohi/faxplus-python.git ``` Getting started ```python theme={null} from faxplus import ApiClient, Configuration, FaxesApi configuration = Configuration() configuration.access_token = "YOUR_ACCESS_TOKEN" client = ApiClient(configuration) api = FaxesApi() faxes = api.list_faxes("self", category=FaxCategory.INBOX) ``` # Authentication Source: https://apidoc.fax.plus/concepts/authentication Authentication ### Authentication Fax.Plus API offers two methods for authentication: * **Personal Access Tokens (PATs) (Recommended)** * OAuth2 Authorization Code ## Option 1: Personal Access Tokens (PATs) To generate a new token, go to the [Integrations](https://app.fax.plus/profile/integrations) page in your account settings. **Scopes** Personal Access Tokens can be generated with different scopes. Each scope grants access to a specific set of endpoints. The available scopes are: **List of available scopes:** `fax:all:read` Grants read-only access to all fax-related operations, including viewing faxes, users, members, and numbers. `fax:all:edit` Grants full access to all fax-related operations, allowing editing and management of faxes, users, members, webhooks, and numbers. `fax:webhook:read` Allows read-only access to webhook configurations, enabling retrieval of webhook details. `fax:webhook:edit` Grants full access to manage and modify all webhook configurations. `fax:fax:read` Allows viewing and listing of all faxes, including access to outbox lists, fax files, and reports. `fax:fax:edit` Grants full permissions to manage and edit faxes, including operations on the outbox, files, and fax details. `fax:user:read` Allows viewing of the current user's details (PAT owner). `fax:user:edit` Grants permission to update the current user's details (PAT owner). `fax:member:read` Allows viewing of account and member details, including retrieving account and member-specific information. `fax:member:edit` Grants permission to update member details and manage account-related member information. `fax:numbers:read` Allows retrieval and listing of fax numbers. `fax:numbers:edit` Grants full permissions to manage and edit fax numbers, including all operations related to numbers. You have to include an **Authorization** header with a value of **Bearer TOKEN** in every request. ## Option 2: OAuth2 Authorization Code Fax.Plus API also employs the OAuth2 Authorization Code flow for getting and refreshing the authentication token. This flow requires: * explicit access confirmation from the user * redirect URL to which user will be redirected after logging in It is not required for the redirect URL to be accessible from any place other than user's localhost. For a standalone app it is possible to use a micro HTTP server to get the redirect, fetch the authorization code from it, and shut the server down. #### OAuth2 Authorization Code Grant The first step is to obtain an authorization code. Redirect the user to the URL [https://accounts.fax.plus/login](https://accounts.fax.plus/login) providing the following query parameters: * `client_id` - your client ID * `redirect_uri` - one of your registered redirect URIs * `response_type=code` * `scope=all` Let's assume we have [http://my.web.app](http://my.web.app) as the registered URI. This URI should be accessible to the user. `https://accounts.fax.plus/login?response_type=code&client_id=CLIENT_ID&redirect_uri=http://my.web.app&scope=all` On the redirected page, the user will be asked to log in and authorize the API. After the permission is granted, the user will be redirected to the given redirect URI with the authorization code as a code query parameter. For example, [http://my.web.app?code=XXXXXX](http://my.web.app?code=XXXXXX) The next step is to obtain an access token. The client must send a HTTP POST request to the base URL [https://accounts.fax.plus/token](https://accounts.fax.plus/token) with the following parameters: * Headers: * `Content-type: application/x-www-form-urlencoded` * `Authorization: Basic XXX` where `XXX` is the base64 encoded string `CLIENT_ID:CLIENT_SECRET` * Parameters (url-encoded in query or body): * `grant_type=authorization_code` * `client_id=YOUR_CLIENT_ID` * `code=AUTHORIZATION_CODE_FROM_PREVIOUS_STEP` * `redirect_uri=YOUR_REDIRECT_URL` Note: when using 3rd party OAuth libraries, ensure that the `Authorization` header is properly composed, and that the client ID is passed in the request body. Most libraries require additional flags to be set to enable this behavior. If the request was successful, you will be granted an access token in JSON format. This token should be passed as a Bearer Token inside the Authorization header with every request. #### Refreshing An OAuth2 Access Token To renew your access token, make an `HTTP POST` request to the base URL [https://accounts.fax.plus/token](https://accounts.fax.plus/token), passing the refresh token that you have received when obtaining the initial access token as a `refresh_token` query parameter. Add the `grant_type` parameter equal to the `refresh_token`. `https://accounts.fax.plus/token?grant_type=refresh_token&refresh_token=REFRESH_TOKEN` Use the same Authorization header as the one you used for obtaining the access token. In the response, you will receive the same JSON structure as the one returned when issuing the access token. The refresh token will remain valid until the user requests a new access token, or revokes the permissions given to the client. # Fax Source: https://apidoc.fax.plus/concepts/fax Fax ## Definition A **Fax** is a document that you want to send to one or more recipients using the Fax.Plus system. Faxes can be in various formats such as PDF, Word, Excel, and other common file types. ## Key Concepts ### Receiving a Fax Fax.Plus can receive faxes on your behalf. In the default setup, faxes are delivered as fully received documents once the transmission is complete, with all pages included in a single file. If you have a use case where you need to start processing pages as soon as they arrive, a fax streaming option (page‑by‑page delivery) is available on demand. Contact us to discuss enabling it for your account. ### Sending a Fax When sending a fax, you typically need to provide: 1. One of your numbers that will be used as a source number 2. The recipient's fax number(s) 3. The document(s) you want to send 4. Any additional options (e.g., cover page, scheduling) Each source number is subject to rate limiting based on your subscription. If you need to send more concurrent faxes than a single number allows, you can load‑balance by providing a comma‑separated list of allowed numbers in the `from` field. The platform will pick one per destination. See the [Send a fax](/api-reference/endpoints/outbox/send-a-fax) endpoint for details. You can upload up to 10 different files per fax, regardless of the number of pages in each file. The maximum total file size is 150 MB. You can include up to 4000 destinations in a single fax request; for larger fan‑out jobs, split your recipients into multiple faxes. If you exceed these limits: * The API returns **413 Payload Too Large** when the total size of all files in a fax exceeds 150 MB. * The API returns **400 Bad Request** with an error code of `too_many_files` when more than 10 files are provided. * The API returns **400 Bad Request** with an error code of `too_many_destinations` when the `to` list contains more than 4000 destinations. ### File Formats Fax.Plus supports a wide range of file formats, including: * Documents: DOC, DOCX, PDF, TXT, RTF * Images: JPG, PNG, TIFF * Spreadsheets: XLS, XLSX Received faxes are available for download through the API in **PDF** and **TIFF** formats (depending on the endpoint and requested content type). ### Cover Pages You can optionally add a fax cover page when sending a fax. A cover page can include: * The sender and recipient names * A subject * A short message or note You can also replace the default Fax.Plus logo in the upper‑right corner of the cover page with your account’s company logo. If no company logo is configured on the account, this flag is silently ignored. To learn how to configure cover sheets and upload your logo in the web app, see the [“How can I add a cover sheet to my fax?” help article](https://help.alohi.com/hc/en-us/articles/10122557790492-How-can-I-add-a-cover-sheet-to-my-fax). ### Fax Status After sending a fax, you can track its status. The status indicates whether the fax was successfully sent, is still in progress, or encountered an error. You can use webhooks to receive real-time updates on fax transmission status. ### Rate limits Faxing is a comparatively slow operation: a single page typically takes around 30–60 seconds to transmit. Because of this, the Fax.Plus API does **not** enforce strict per-endpoint quotas under normal, reasonable usage. However, we do monitor for clearly abusive or unreasonable traffic patterns (for example, polling status every few hundred milliseconds or sending dozens of requests per second). In such cases we may start rate-limiting or throttling requests to protect the platform. **Recommendations:** * Design your integration around the natural pace of faxing (batch sends are fine, but avoid very tight polling loops). * Prefer [webhooks](/concepts/webhook) for status updates instead of frequent polling of fax or outbox endpoints. * Ensure your files are not corrupted or password-protected before sending. * If you expect a large migration or unusually high one-time load, contact us so we can plan capacity together. ### Retries Retries are configured **per submission** when sending a fax. For a detailed view of the retry options available in the request payload, check the [Send a fax](/api-reference/endpoints/outbox/send-a-fax) API reference. * **count**: Number of tries to send the fax. Allowed range: **0–3**. * **delay**: Delay **in minutes** between two retries. Allowed range: **0–720**. By default, when a retry happens the fax is resent starting from page 1. If you enable the **“partially sent retry”** option, retries resume from where the previous attempt stopped instead of starting over. When using partially sent retries, make sure the remote side can accept “chunked” submissions: from their perspective, the retransmitted pages may look like a separate fax. ## Fax Error Statuses Meanings for `status` on fax records and the list-faxes `status` filter. | Status | Description | | :- | :- | | success | The fax was successfully sent. | | partially\_sent | The first pages were transmitted, but the call dropped due to connection issues. | | partially\_received | The first pages were received, but the call dropped due to connection issues. | | in\_progress | The fax is currently being received ; you can retrieve some pages via the API, or wait for the final status. | | insufficient\_credit | Not enough credit to send or receive pages. Add credit or wait for plan reset. | | failed | Generic error. Retry, and contact support if the issue persists. | | failed\_internal\_process\_error | Generic error. Retry, and contact support if the issue persists. | | failed\_user\_busy | The destination was busy. Wait and retry. | | failed\_no\_answer | No answer at the destination. Retry when you know the recipient is available. | | failed\_unallocated\_number | Invalid number. Check the number, including country and area codes. | | failed\_office\_converter\_issue | Failed to convert Microsoft Office document. Recreate and resubmit the file. | | failed\_separate\_file\_pages\_issue | File conversion issue. Check if all pages in the source file(s) are valid. | | failed\_render\_header\_issue | File conversion issue. Check if all pages in the source file(s) are valid. | | failed\_invalid\_number\_format | Invalid number format. Check the number, including country and area codes. | | failed\_mimetype\_not\_supported | Unsupported file type. | | failed\_destination\_not\_supported | Number is a special service number or not supported by your plan. | | failed\_image\_preparation | File conversion issue. Check if all pages in the source file(s) are valid. | | failed\_to\_send | System was busy. Try again later. | | failed\_origination\_unknown | Call could not be originated due to an unexpected telephony response. Retry later; if it persists, contact support and include the fax ID. | | failed\_no\_origination | The call could not be originated. Retry later. | | failed\_no\_user\_response | No response from the destination during call setup. Retry when the recipient is available. | | failed\_call\_rejected | The destination rejected the call. The number may be blocked. | | failed\_exchange\_routing\_error | Carrier routing error during call setup. Retry later. | | failed\_no\_route\_destination | No route to the destination. Check the number, including country and area codes. | | failed\_normal\_circuit\_congestion | The network was congested. Retry later. | | failed\_recovery\_on\_timer\_expire | Call setup timed out. Retry later. | | failed\_requested\_chan\_unavail | No channel was available to place the call. Retry later. | | failed\_network\_out\_of\_order | Network outage during call setup. Retry later. | | failed\_destination\_out\_of\_order | The destination appears out of service. Retry later; if it persists, contact the recipient. | | failed\_normal\_temporary\_failure | Temporary network issue. Retry immediately. | | failed\_unknown\_converter\_issue | File conversion failed. Check if the file is password-protected. | | failed\_normal\_clearing | Destination was busy. Wait and retry. | | failed\_convert\_to\_tiff\_issue | File conversion issue. Check if all pages in the source file(s) are valid. | | failed\_fs\_2 / failed\_fs\_3 | The call was established, but there was no fax machine responding to the call. Check the number and retry. | | failed\_fs\_8 / failed\_fs\_9 | Fax protocol incompatibility between the two endpoints. Check that the recipient is using a standard fax machine or service, and retry. | | failed\_fs\_31 / failed\_fs\_32 | The remote fax stopped responding during the call (for example, due to line issues or device lockups). Retry later; if the issue persists, contact the recipient. | | failed\_fs\_35 / failed\_fs\_39 | The remote fax disconnected unexpectedly or hung up before the transmission completed. Retry later; if the issue persists, contact the recipient. | | failed\_fs\_48 | Remote fax machine disconnected after the same message was sent multiple times unsuccessfully. Some pages may have been transmitted. | | failed\_fs\_49 | Remote fax machine disconnected unexpectedly. Some pages may have been transmitted. | | failed\_fs\_\* | Fax communication error (for example, line quality, timeouts, or other low-level fax protocol issues). Retry later; if the issue persists, contact support and include the fax ID. | ## Best Practices 1. **File Preparation**: Ensure your files are not corrupted or password-protected before sending. 2. **Number Verification**: Double-check fax numbers, including country and area codes. 3. **Retry Strategy**: For temporary failures, implement a retry mechanism with appropriate intervals. ## Schema # Number Source: https://apidoc.fax.plus/concepts/number Number ## Definition A **Number** in the Fax.Plus system represents a fax-enabled phone number. It can be used to send faxes from (as your own number) or to send faxes to (as a recipient's number). Numbers are a crucial part of the faxing process, allowing you to manage your fax communication channels effectively. ## Key Concepts ### Number Acquisition * Numbers are acquired through the Fax.Plus service. * Each number has an `acquired_date` indicating when it was obtained. ### Number Assignment * Numbers can be assigned to one or more users within your organization. * The `assigned_to` field contains an array of user IDs who have access to the number. ### Number Ownership * Each number has an `owner_id`, typically the user or organization that acquired the number. ### Notifications * Numbers can be configured with various notification settings for different events (e.g., receiving a fax, voicemail, etc.). ## Number Properties | Property | Description | | - | - | | id | Unique identifier for the number | | number | The actual phone number in E.164 format (e.g., +16699990000) | | owner\_id | ID of the user or organization that owns the number | | status | Current status of the number (waiting\_verification or active) | | assigned\_to | Array of user IDs to whom this number is assigned | | acquired\_date | Date and time when the number was acquired | | expiration\_date | Date when the number will expire (if applicable) | | friendly\_name | Optional display name assigned to the fax number | | is\_canceled | Boolean indicating if the number has been canceled | | notifications | Array of notification settings for various events | ## Using Numbers ### Sending Faxes When sending a fax, you can specify the "from" number to use. This should be one of your acquired and active numbers. ### Receiving Faxes Incoming faxes will be directed to the numbers you've acquired. You can set up notifications to alert you when a fax is received. ### Managing Numbers The Fax.Plus API provides endpoints to: * List all your numbers * Get details about a specific number * Assign numbers to users * Revoke numbers from users ### Schema # Outbox Source: https://apidoc.fax.plus/concepts/outbox Outbox ## Definition An **Outbox** is a collection of faxes that are in the process of being sent or have been sent recently. It serves as a management interface for outgoing faxes, allowing you to monitor their status and perform various actions. ## Key Concepts ### Fax Statuses in Outbox Faxes in the outbox can have various statuses, including: * **submitted**: The fax has been submitted to the system * **converting**: The fax is being converted to the appropriate format for transmission * **scheduled\_for\_sending**: The fax is scheduled to be sent at a future time * **sending**: The fax is currently being transmitted ### Actions on Outbox Faxes The Outbox interface allows you to perform several actions on faxes: 1. **Delete**: To cancel the fax transmission 2. **Download**: To retrieve a copy of the fax document 3. **Add note**: To attach a note to the fax for reference 4. **Resend/Forward**: To reuse the fax file for sending to new recipients ### Resending and Forwarding Faxes You can reuse files from existing faxes without uploading them again. This is useful for: * **Resending failed faxes**: Quickly retry a fax that didn't go through * **Forwarding received faxes**: Send a received fax to new recipients * **Bulk operations**: Send the same document to multiple recipients over time * **Combining documents**: Append additional files to an existing fax. When combining, uploaded files are sent first, followed by the file from the existing fax. When you resend or forward a fax, you can customize all parameters including destination numbers, cover pages, and sending options. To preserve the original quality when resending, set `options.enhancement: false` to prevent reprocessing the fax file. ### Monitoring Fax Progress The Outbox is your primary tool for monitoring the progress of sent faxes. You can: * See which faxes are currently being sent * Track the success of your fax transmissions ### Schema # Shop Source: https://apidoc.fax.plus/concepts/shop Authentication ### Shop Capabilities The Fax.Plus API offers a comprehensive set of shop features that allow developers to manage their account balance, explore available fax numbers, and make purchases. These capabilities provide a seamless integration for applications that need to handle fax number acquisitions and account management. ## Key Features 1. **Balance Check** Developers can query the current balance of their Fax.Plus account. 2. **Country Availability** The API provides a list of all countries where fax numbers are available for purchase. At the moment, only the United States and Canada are supported. 3. **Area Listings** Within each available country, the API offers a list of geographic areas where fax numbers can be acquired. This granular information allows for precise number selection based on specific location needs. 4. **Number Search** Developers can search for available fax numbers using country and geographic area filters. This feature enables applications to find the most suitable numbers for their users' needs. 5. **Number Purchase** Once a desired number is identified through the search feature, the API allows for immediate purchase of that number. ## Payment The Fax.Plus API uses only the account balance to purchase numbers. If the account balance is insufficient, the purchase will fail. Developers can use the balance check feature to ensure that the account has enough funds before attempting a purchase. If there is not enough balance to complete a purchase, developers can use the [http://app.fax.plus](http://app.fax.plus) web interface to add funds to their account. # Webhook Source: https://apidoc.fax.plus/concepts/webhook Webhook ## Definition A **webhook** delivers a POST request to your server when a fax event happens. Use it instead of polling fax or outbox endpoints. The current API is `POST /v3/webhooks`. The older `POST /v3/hooks` API still works and is documented as [legacy](#legacy-hooks-api). Webhooks must be enabled for your account. Open [Settings → Integrations](https://app.fax.plus/profile/integrations) and enable webhooks before you call `/v3/webhooks`. Until then the API returns **404** (`application not found, enable webhooks in Fax.Plus integrations settings`). The account also needs the webhooks feature; otherwise the API returns **403**. ## Events Use underscore names only. Dotted aliases are not accepted. | Event | When it fires | | - | - | | `fax_sent` | Outbound fax finished (success or failure — check `data.status`) | | `fax_received` | Inbound fax finished | | `fax_page_received` | One inbound page arrived. Requires fax streaming (on request) | One endpoint can subscribe to several events via `filter_types`. ## Setting up webhooks 1. Enable webhooks in [Integrations](https://app.fax.plus/profile/integrations). After you create an endpoint, copy its signing secret from that panel (see [Verify signatures](#verify-signatures)). 2. Expose an HTTPS URL that accepts POST and returns **200** quickly. 3. Create the endpoint with the API: ```bash theme={null} curl -X POST https://restapi.fax.plus/v3/webhooks \ -H 'Authorization: Bearer {access-token}' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/fax-webhooks", "filter_types": ["fax_sent", "fax_received"] }' ``` `url` and `filter_types` are required. `filter_types` must contain at least one event. A create that only sends `url` is **400**. Create returns **201** with an empty body. List endpoints afterward to read the `ep_…` id. See [Create a webhook endpoint](/api-reference/endpoints/webhooks/create-webhook-endpoint) for the full request. ### Number filters (`channels`) Optional `channels` is a list of E.164 numbers (`+12135550123`). The endpoint fires only when the fax **from** or **to** matches one of them. You may include numbers you do **not** own — including the remote party. Values with a leading `+` are normalized to E.164 (`+1 571 690 8695` → `+15716908695`). A number without `+` is rejected with **400** (`Invalid number`) — the request never creates or updates the endpoint. * Omit `channels` (or send `null` on create) to receive every matching event. * On `PATCH /v3/webhooks/{endpoint_id}`, send `"channels": null` to clear filters. Omitted fields stay unchanged. ## Handling webhook notifications * **Method**: HTTP POST, JSON body. * **Shape**: `{ "hook": { … }, "data": { … } }` — same shape as the legacy API. * **`hook.target`**: always `""` on `/v3/webhooks` deliveries. One event can go to several endpoints, so the payload cannot carry a single destination URL. Use your own endpoint URL, not this field. Legacy `/v3/hooks` still fills `target` with the configured URL. ## Verify signatures `/v3/webhooks` deliveries are signed with **HMAC-SHA256**. This is a shared **signing secret**, not a TLS or X.509 certificate. The REST API never returns the secret. ### Where to get the secret 1. Open [Settings → Integrations](https://app.fax.plus/profile/integrations). 2. In the **Webhooks** section, click **Manage**. A panel opens. 3. Create the webhook if it does not exist yet, then click it. 4. Open **Advanced** and scroll to the bottom. 5. Expand **Signing Secret** and use the eye icon to reveal it. Each endpoint has its own secret; rotating it invalidates the previous value. Webhook Advanced settings with Signing Secret at the bottom Treat it like a password. Do not commit it or expose it in client-side code. The REST API never returns this secret. ### Headers Every current-API POST includes: | HTTP header | Meaning | | - | - | | `webhook-id` | Unique id for this delivery. Retries and replays of the **same** delivery reuse this value. | | `webhook-timestamp` | Unix timestamp (seconds) when the delivery was signed. | | `webhook-signature` | One or more signatures, space-separated, each `v1,`. | ### How to verify 1. Read the **raw request body** as bytes. Do not parse and re-serialize JSON first — whitespace changes break the signature. 2. Drop the `whsec_` prefix from the secret and **base64-decode** the rest. That is the HMAC key. 3. Build the signed string exactly as: `{webhook-id}.{webhook-timestamp}.{raw body}` Example: `msg_abc.1710000000.{"hook":…}` 4. Compute `HMAC-SHA256(key, signed_string)` and **base64-encode** the digest. 5. Compare that value to each `v1,` signature in `webhook-signature` using a constant-time compare. Accept if any matches. 6. Reject the request if `webhook-timestamp` is more than **5 minutes** off your clock (replay protection). ```python theme={null} import base64 import hashlib import hmac import time def verify_webhook(secret: str, msg_id: str, timestamp: str, body: bytes, signatures: str) -> bool: if abs(time.time() - int(timestamp)) > 300: return False key = base64.b64decode(secret.removeprefix("whsec_")) expected = base64.b64encode( hmac.new(key, f"{msg_id}.{timestamp}.".encode() + body, hashlib.sha256).digest() ).decode() return any( hmac.compare_digest(expected, part.split(",", 1)[-1]) for part in signatures.split() if part.startswith("v1,") ) ``` ```js theme={null} const crypto = require("crypto"); function verifyWebhook(secret, msgId, timestamp, body, signatures) { if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) { return false; } const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64"); const expected = crypto .createHmac("sha256", key) .update(`${msgId}.${timestamp}.`) .update(body) .digest("base64"); return signatures.split(" ").some((part) => { if (!part.startsWith("v1,")) return false; const sig = Buffer.from(part.slice(3)); const exp = Buffer.from(expected); return sig.length === exp.length && crypto.timingSafeEqual(exp, sig); }); } ``` ### Optional: allowlist source IPs To allowlist source IPs, see the current list in the [Fax.Plus webhooks help article](https://www.fax.plus/webhooks-help). ## Payload ### fax\_sent Fired when an outbound fax session finishes. Check `data.status` — it is not success-only. ```json fax_sent payload theme={null} { "hook": { "id": "66df09cf1d6d0b295c363956", "event": "fax_sent", "event_time": "2024-09-09 10:44:39", "target": "" }, "data": { "id": "66df09cf1d6d0b295c363956", "uid": "490ae330dbc749f0b6561dafa300f2fb", "pages": 1, "from": "+1 334-304-xxxx", "to": "+1 334-304-xxxx", "start_time": "2024-09-09 10:44:39", "file": "1d0b618e4fb54957878eed0ecc64ae5e.tiff", "file_name": "fax-to-1334304xxxx", "status": "success", "cost": 1 } } ``` If `hook.id` is not equal to `data.id`, the fax is being retried. If they match, this is the first attempt. #### Payload schema | Name | Type | Required | Description | | :- | :- | :- | :- | | **hook** | object | Yes | Hook and event description | | id | `string` | Yes | Fax ID | | event | `string` | Yes | Event type | | event\_time | `string` | Yes | Time of the event. Format: YYYY-MM-DD HH:mm:ss | | target | `string` | Yes | Empty string on `/v3/webhooks`. Legacy `/v3/hooks` sends the configured URL | | **data** | object | Yes | Callback data, depends on the event type | | id | `string` | Yes | Fax session ID. This ID might differ from the one returned by listFaxes | | uid | `string` | Yes | Sender user ID | | pages | `number` | Yes | Number of pages in the fax | | from | `string` | Yes | Sender number. Might be a user ID for faxes sent from free accounts | | to | `string` | Yes | Fax destination number. Might be a user ID for faxes sent from free accounts | | start\_time | `string` | Yes | Time at which faxing session started. Format: YYYY-MM-DD HH:mm:ss | | file | `string` | Yes | File ID | | file\_name | `string` | Yes | Human-readable file name | | cost | `number` | Yes | Fax cost (in pages) | | status | `FaxStatus` | Yes | Fax status | ### fax\_received Fired when an inbound fax session finishes. ```json fax_received payload theme={null} { "hook": { "id": "9b0cfcad-5bf8-41ff-94f7-eb5b1b85a0bf", "event": "fax_received", "event_time": "2024-09-09 12:44:39", "target": "" }, "data": { "id": "9b0cfcad-5bf8-41ff-94f7-eb5b1b85a0bf", "uid": "490ae330dbc749f0b6561dafa300f2fb", "pages": 1, "from": "+1 334-304-xxxx", "to": "+1 334-304-xxxx", "start_time": "2024-09-09 12:44:39", "file": "27ade44579274f01b55e552cd361990e.tiff", "file_name": "fax-from-1334304xxxx", "status": "success", "cost": 1 } } ``` #### Payload schema Same schema as `fax_sent`. ### fax\_page\_received The `fax_page_received` event is only available if your account has fax streaming enabled. This feature is available on request — contact us to discuss enabling it for your account. Fired once per received page so you can process pages before the fax completes. ```json fax_page_received payload theme={null} { "hook": { "id": "9b0cfcad-5bf8-41ff-94f7-eb5b1b85a0bf", "event": "fax_page_received", "event_time": "2024-09-09 12:44:39", "target": "" }, "data": { "id": "9b0cfcad-5bf8-41ff-94f7-eb5b1b85a0bf", "page": 1, "from": "+1 334-304-xxxx", "to": "+1 334-304-xxxx" } } ``` #### Payload schema | Name | Type | Required | Description | | :- | :- | :- | :- | | **hook** | object | Yes | Hook and event description | | id | `string` | Yes | Fax session ID | | event | `string` | Yes | Event type | | event\_time | `string` | Yes | Time of the event. Format: YYYY-MM-DD HH:mm:ss | | target | `string` | Yes | Empty string on `/v3/webhooks`. Legacy `/v3/hooks` sends the configured URL | | **data** | object | Yes | Callback data for the page received event | | id | `string` | Yes | Fax session ID | | page | `number` | Yes | Page number that was received (starting from 1) | | from | `string` | Yes | Sender number. Might be a user ID for faxes sent from free accounts | | to | `string` | Yes | Fax destination number. Might be a user ID for faxes sent from free accounts | ## Handling the notification 1. [Verify the HMAC](#verify-signatures). 2. Parse `hook.event` and `data`. 3. Apply your business logic. See [Idempotency](#idempotency). 4. Return **200** quickly. Long work belongs in a queue. Non-2xx responses are retried. ### Idempotency The same delivery can hit your URL more than once: automatic retries after a non-2xx, or a manual replay from the Integrations panel. The **`webhook-id` HTTP header** identifies **that delivery**. It is not a field in the JSON body. Retries and replays keep the same header value. A new fax event gets a new one. `hook.id` and `data.id` in the payload identify the **fax**, not the delivery. Do not use them as the only dedup key. Read `webhook-id` from the request headers and store each value you have already processed (cache or database, keep it for at least a few days). If it is already stored, skip the work and still return **200** so retries stop. If you return an error after you already applied the update, the next retry will send the same `webhook-id` header again. ## API reference | Action | Endpoint | | - | - | | List | [`GET /v3/webhooks`](/api-reference/endpoints/webhooks/list-webhook-endpoints) | | Create | [`POST /v3/webhooks`](/api-reference/endpoints/webhooks/create-webhook-endpoint) | | Update | [`PATCH /v3/webhooks/{endpoint_id}`](/api-reference/endpoints/webhooks/update-webhook-endpoint) | | Delete | [`DELETE /v3/webhooks/{endpoint_id}`](/api-reference/endpoints/webhooks/delete-webhook-endpoint) | Scopes: `fax:webhook:read` / `fax:webhook:edit`, or `fax:all:read` / `fax:all:edit`. ## Legacy `/hooks` API Legacy webhooks (`/v3/hooks`) will be decommissioned soon. Use [`/v3/webhooks`](/api-reference/endpoints/webhooks/create-webhook-endpoint) for new integrations. `GET/POST /v3/hooks` and `DELETE /v3/hooks/{hook_id}` remain available. Each hook has one `event`, a `target` URL, and optional `numbers` (owned numbers only). See [List user webhooks (Legacy)](/api-reference/endpoints/webhooks/list-user-webhooks). # Get account balance Source: https://apidoc.fax.plus/endpoints/shop/get-account-balance get /shop/balance Get your account balance. (Permitted scopes: **fax:all:read**, **fax:shop:read**) # List areas Source: https://apidoc.fax.plus/endpoints/shop/list-areas get /shop/numbers/countries/{country_code}/areas Get a list of areas where you can purchase fax numbers for a specific country. (Permitted scopes: **fax:all:read**, **fax:shop:read**) # List available numbers Source: https://apidoc.fax.plus/endpoints/shop/list-available-numbers get /shop/numbers/countries/{country_code}/areas/{calling_code}/numbers Get a list of available fax numbers for a specific area. (Permitted scopes: **fax:all:read**, **fax:shop:read**) # List countries Source: https://apidoc.fax.plus/endpoints/shop/list-countries get /shop/numbers/countries Get a list of countries where you can purchase fax numbers. (Permitted scopes: **fax:all:read**, **fax:shop:read**) # Purchase a number Source: https://apidoc.fax.plus/endpoints/shop/purchase-a-number post /shop/numbers/purchase Purchase an available fax number. (Permitted scopes: **fax:all:edit**, **fax:shop:edit**) # Fax.Plus MCP Server Source: https://apidoc.fax.plus/get-started/fax-plus-mcp Send and receive faxes from any MCP-compatible AI assistant using the Fax.Plus API The Fax.Plus MCP Server lets AI assistants send and receive faxes, manage contacts, and track delivery through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io) — an open standard for connecting AI tools to external services. Connect it once and your assistant can fax a signed contract, tell you what arrived in your inbox this morning, or confirm whether last night's transmission went through — in plain language, without you opening the dashboard. ## MCP server URL ``` https://mcp.fax.plus/mcp ``` *** ## What you can do | Capability | Description | | - | - | | **Send faxes** | Upload a document and send it to any fax number worldwide | | **Receive faxes** | Check your inbox for incoming faxes, filter by date or sender | | **Track delivery** | Monitor outbox status and get real-time delivery confirmations | | **Manage contacts** | List, create, update, and organize fax contacts and groups | | **View numbers** | See assigned fax numbers, status, and notification settings | | **File uploads** | Upload documents for faxing (PDF, TIFF, DOC, and more) | The MCP Server covers day-to-day faxing. Account provisioning, team management, and webhook configuration are handled through the [REST API](https://apidoc.fax.plus) — see [MCP and the REST API](#mcp-and-the-rest-api). *** ## Prerequisites Before connecting, make sure you have: 1. An active **paid Fax.Plus plan** — Basic or higher. See [Plan availability](#plan-availability). 2. At least one **fax number** assigned to your account, if you want to receive faxes. No token or credential setup is needed in advance — authentication happens through OAuth when you add the server to your client. *** ## Authentication The MCP Server supports two authentication methods. **OAuth 2.0 is the primary flow** and works on every supported plan. Personal Access Tokens are an alternative for Enterprise accounts that need a static credential. ### OAuth 2.0 (recommended) Most MCP clients connect in three steps. No token or credential setup needed. In your MCP client, add `https://mcp.fax.plus/mcp` as a remote server. A screen opens in your browser. Log in to your Fax.Plus account to approve access. Your assistant is connected. You can start interacting with the MCP in the chat. Access and permissions are bound to the account you log in with. **Redirect URI allowlist** — During registration, the `redirect_uri` your client supplies must match an allow-listed pattern (for example `https://claude.ai/api/mcp/auth_callback`, `https://chatgpt.com/connector/oauth/*`, or `http://localhost:*` for local development clients). Registration attempts with a redirect URI outside this list are rejected. Contact [support@alohi.com](mailto:support@alohi.com) if your MCP client needs to be added to the allowlist. ### Personal Access Tokens (Enterprise only) A PAT is useful when your client has no OAuth support, or for headless and server-side integrations where an interactive login isn't possible. PATs are available on the Enterprise plan; on other plans, use OAuth. Log in to your [Fax.Plus account](https://app.fax.plus) and go to **Settings → Integrations**. Under **Fax.Plus API**, find **Personal Access Tokens** and click **Manage**. Create a new token and select the appropriate scopes for your use case. Copy the token immediately — it won't be shown again. [How to create a PAT →](https://help.alohi.com/hc/en-us/articles/16679733815708) #### Scopes used by the MCP Server | Scope | Access | | - | - | | `fax:all:read` | Read-only access to all fax operations | | `fax:all:edit` | Full access to all fax operations | | `fax:fax:read` | View and list faxes, outbox, files, reports | | `fax:fax:edit` | Send faxes, manage outbox and files | | `fax:user:read` | View the current user's account details (PAT owner) | | `fax:user:edit` | Update the current user's account details (PAT owner) | | `fax:member:read` | View corporate member details | | `fax:numbers:read` | List and view assigned fax numbers | | `fax:numbers:edit` | Manage and configure fax numbers | For most use cases, `fax:all:read` and `fax:all:edit` provide the access you need. Use granular scopes when you want to restrict what the integration can do. Additional scopes exist for webhook, shop, and AI endpoints, which are available through the REST API only. See [Authentication](https://apidoc.fax.plus/concepts/authentication) for the full list. *** ## Connecting to an MCP client The Fax.Plus MCP Server works with any client that supports the Model Context Protocol over remote HTTP. Find your client below. | Client | Where to add it | Auth | | - | - | - | | **Claude.ai** (web and mobile) | Settings → Connectors | OAuth | | **Claude Desktop** | Settings → Connectors | OAuth | | **Claude Code** | `claude mcp add` (see below) | OAuth | | **Cursor** | `.cursor/mcp.json` | OAuth | | **ChatGPT** | Settings → Plugins | OAuth | | **VS Code** (GitHub Copilot) | `.vscode/mcp.json` | OAuth | | **Other MCP clients** | Client's remote MCP server settings | OAuth | | **Headless / server-side** | Anthropic API, OpenAI Agents SDK, custom | PAT | Clients with native OAuth support need nothing but the server URL — a login screen opens, you sign in to Fax.Plus, and you're connected. If your client isn't listed, it will still work provided it supports remote HTTP MCP servers and its redirect URI is allow-listed; contact [support@alohi.com](mailto:support@alohi.com) to have one added. ### Claude.ai, Claude Desktop, and ChatGPT 1. Open **Settings → Connectors(Claude) / Plugins(ChatGPT)** 2. Add a custom connector with URL `https://mcp.fax.plus/mcp` 3. Complete the Fax.Plus login and authorization flow ### Claude Code ```bash theme={null} claude mcp add --transport http faxplus https://mcp.fax.plus/mcp ``` Then run `/mcp` inside Claude Code and choose **Authenticate** to complete the OAuth flow. ### Cursor ```json theme={null} { "mcpServers": { "faxplus": { "type": "url", "url": "https://mcp.fax.plus/mcp" } } } ``` ### VS Code (GitHub Copilot) ```json theme={null} { "servers": { "faxplus": { "type": "http", "url": "https://mcp.fax.plus/mcp" } } } ``` ### Claude Desktop with a PAT (Enterprise only) Claude Desktop's `claude_desktop_config.json` only supports **stdio** MCP servers (`command` + `args`). It does not accept `"type": "url"` — entries without `command` are ignored and may be removed when Claude Desktop saves the file. Use `mcp-remote` as a bridge: ```json theme={null} { "mcpServers": { "faxplus": { "command": "npx", "args": [ "-y", "mcp-remote", "https://mcp.fax.plus/mcp", "--header", "Authorization:${FAXPLUS_PAT}" ], "env": { "FAXPLUS_PAT": "Bearer YOUR_PERSONAL_ACCESS_TOKEN" } } } } ``` `mcp-remote` runs locally as a stdio process Claude Desktop can talk to, and forwards requests over HTTP to `https://mcp.fax.plus/mcp`. Passing the token via `env` keeps it out of the `args` array. For most Claude Desktop users, **Settings → Connectors** is the simpler path and needs no config file or PAT. ### Cursor and Claude Code with a PAT (Enterprise only) ```json theme={null} { "mcpServers": { "faxplus": { "type": "url", "url": "https://mcp.fax.plus/mcp", "headers": { "Authorization": "Bearer YOUR_PERSONAL_ACCESS_TOKEN" } } } } ``` ### Anthropic API (MCP Connector) Requires an Enterprise plan, since this path authenticates with a PAT. ```python theme={null} import anthropic client = anthropic.Anthropic() response = client.beta.messages.create( model="claude-sonnet-4-6", max_tokens=1024, betas=["mcp-client-2025-11-20"], mcp_servers=[ { "type": "url", "url": "https://mcp.fax.plus/mcp", "name": "faxplus", "authorization_token": "YOUR_PERSONAL_ACCESS_TOKEN", } ], messages=[ {"role": "user", "content": "Check my fax inbox for anything received today"} ], ) ``` ### OpenAI Agents SDK Requires an Enterprise plan, since this path authenticates with a PAT. ```python theme={null} from openai_agents import Agent, MCPServerSse faxplus_server = MCPServerSse( url="https://mcp.fax.plus/mcp", headers={"Authorization": "Bearer YOUR_PERSONAL_ACCESS_TOKEN"}, ) agent = Agent( name="Fax Assistant", instructions="Help the user send and receive faxes.", mcp_servers=[faxplus_server], ) ``` *** ## Available tools The Fax.Plus MCP Server exposes 38 tools to connected AI assistants. Which tools are usable depends on your plan and, for PAT connections, the scopes on your token. ### Accounts | Tool | Description | | - | - | | `get-token-info` | Get current token metadata/scopes | | `get-user` | Get account information | | `get-plan` | Get plan type and admin/owner flags | | `list-members` | List corporate members | | `get-member-details` | Get corporate member role and quota | ### Numbers | Tool | Description | | - | - | | `list-numbers` | List assigned/purchased fax numbers | | `get-number` | Get details for one fax number | | `update-number` | Update number assignment | ### Faxes | Tool | Description | | - | - | | `list-faxes` | List fax records | | `get-fax` | Get a specific fax record | | `update-fax` | Update fax metadata (`is_read` / `comment`) | | `bulk-update-faxes` | Bulk update fax metadata | | `delete-fax` | Delete a single fax record (destructive) | ### Files | Tool | Description | | - | - | | `request-file-from-user` | Ask the user to attach a document to send | | `pipeline_start` | Begin a send pipeline and return a `pipeline_id` | | `upload-file` | Upload a document for sending | | `get-file` | Download fax file (`pdf`/`tiff`) | | `get-file-page` | Download single fax page | | `get-fax-report` | Get fax confirmation report | | `get-fax-thumbnail` | Get fax thumbnail image | **Sending a document from chat** — When you ask an assistant to send a file, the flow is `pipeline_start` → `request-file-from-user` → `send-fax-uploaded`. The assistant prompts you to attach the document, and the file is uploaded directly to Fax.Plus rather than passing through the model. You don't call these tools yourself; your client handles the sequence. ### Outbox | Tool | Description | | - | - | | `list-outbox-faxes` | List outgoing/queued faxes | | `get-outbox-fax` | Get one outgoing fax | | `send-fax-uploaded` | Send fax using uploaded file paths | | `resend-fax` | Resend using an existing fax as source | | `update-outbox-fax` | Update queued outbox fax | | `bulk-update-outbox-faxes` | Bulk update queued outbox faxes | | `delete-outbox-fax` | Delete queued outbox fax (destructive) | ### Contacts | Tool | Description | | - | - | | `list-contacts` | List contacts | | `create-contact` | Create contact | | `update-contact` | Update contact | | `delete-contact` | Delete contact (destructive) | | `list-contact-groups` | List contact groups | | `create-contact-group` | Create contact group | | `update-contact-group` | Update contact group | | `delete-contact-group` | Delete contact group (destructive) | | `set-contact-groups` | Assign contacts to groups | | `share-contacts` | Share contacts with corporate members | | `share-contact-groups` | Share contact groups with corporate members | *** ## MCP and the REST API The MCP Server and the REST API serve different jobs. **Use MCP** to work with Fax.Plus from an assistant: reading faxes, sending documents, organizing contacts, checking delivery. It's interactive, authorized in a browser, and revocable at any time. **Use the [REST API](https://apidoc.fax.plus)** to build Fax.Plus into your own product. It's headless, authenticated with a PAT, and covers the full surface. The following are available through the REST API only, and are deliberately not exposed as MCP tools: | Capability | REST API | | - | - | | **Buying fax numbers** | Shop endpoints — browse countries, areas, and available numbers | | **Releasing fax numbers** | Revoke a number from an account | | **Account balance** | Retrieve credit balance | | **Team management** | Invite members, change roles and quotas, resend invitations | | **Account settings** | Update the account owner's own profile and settings | | **Webhooks** | [`/v3/webhooks`](https://apidoc.fax.plus/concepts/webhook) — create, list, update, delete | | **Bulk deletion** | Bulk-delete fax and outbox records | These operations spend money, change who has access to an account, or destroy records that often serve as proof of transmission. They belong in code you control, with your own review and approval steps, rather than in a conversational session. Webhook endpoints are signed with HMAC-SHA256, and the signing secret is only available from **Settings → Integrations** in the dashboard — the REST API never returns it. Set webhooks up there or via `/v3/webhooks`, then verify signatures as described in the [webhook guide](https://apidoc.fax.plus/concepts/webhook). *** ## Usage examples Once connected, you can interact with Fax.Plus through natural language. Here are some common workflows. ### Send a fax > **You:** Send the attached contract to +1-212-555-0199 > **Assistant:** I've uploaded your contract and sent it to +1-212-555-0199. The fax was delivered successfully — 3 pages, transmitted in 12 seconds. The fax ID is `abc123def`. ### Check your inbox > **You:** Did I receive any faxes today? > **Assistant:** You received 2 faxes today: 1. From +1-415-548-5563 at 9:38 AM — 23 pages, status: success 2. From +1-312-555-0142 at 2:15 PM — 1 page, status: success ### Track delivery > **You:** Did my fax to the courthouse go through? > **Assistant:** Yes — your fax to +1-218-413-7255 was delivered successfully at 12:14 PM today. 2 pages, 2 seconds transmission time. ### Manage contacts > **You:** Show me all my fax contacts in the Office group > **Assistant:** You have 1 contact in the "Office\_ch" group: Alohi Fax Machine near Scott, fax number +41 22 794 3479. ### List fax numbers > **You:** What fax numbers do I have? > **Assistant:** You have one active fax number: +1-419-548-5563, acquired October 8, 2024, with email and push notifications enabled. *** ## API reference The MCP Server is built on the [Fax.Plus REST API v3](https://apidoc.fax.plus). For detailed endpoint documentation, schemas, and error codes: Full endpoint reference with request/response examples Get up and running with the Fax.Plus API in minutes OAuth 2.0 and PAT setup guides FAQs, troubleshooting, and how-to articles ### SDKs | Language | Package | | - | - | | Node.js | [`@alohi/faxplus-api`](https://www.npmjs.com/package/@alohi/faxplus-api) | | Python | [`faxplus-api`](https://pypi.org/project/faxplus-api/) | *** ## Plan availability The MCP Server is available on all paid plans. [View pricing](https://www.fax.plus/pricing) | Plan | MCP Server | Notes | | - | - | - | | **Free** | ✗ | Upgrade to Basic or higher | | **Basic** | ✓ | OAuth 2.0 only | | **Premium** | ✓ | OAuth 2.0 only | | **Business** | ✓ | OAuth 2.0 only | | **Enterprise** | ✓ | OAuth 2.0 or Personal Access Token | | **Any plan with Advanced Security Controls** | ✗ | Blocked, including HIPAA- and PHIPA-configured accounts | Personal Access Tokens are an Enterprise feature. On Basic, Premium, and Business plans, connect with an OAuth-capable MCP client. *** ## Security and compliance Fax.Plus is built with enterprise-grade security and meets strict regulatory requirements: * **Encryption:** AES-256 at rest, TLS 1.3+ in transit * **Certifications:** ISO 27001, SOC 2 Type 2, HIPAA (with BAA), PCI DSS * **Compliance:** GDPR, CCPA, eIDAS * **Access control:** SSO, 2FA, role-based permissions, fine-grained PAT scopes * **Data residency:** Flexible options across multiple regions * **Audit trails:** Complete logging of all fax activity **MCP and regulated workloads** — The MCP Server is not available on accounts with Advanced Security Controls enabled, which covers HIPAA and PHIPA configurations. Advanced Security Controls restrict which external systems can access account data, and MCP clients are third-party applications operating outside that boundary. For compliant programmatic faxing, integrate against the [REST API](https://apidoc.fax.plus) instead. See [Fax.Plus HIPAA](https://www.fax.plus/fax-api/hipaa-fax-api). *** ## Limitations * **Free plan not supported** — The MCP Server requires a paid plan (Basic or higher). * **Advanced Security Controls block MCP** — Accounts configured for HIPAA or PHIPA compliance cannot connect. * **PATs require Enterprise** — On Basic, Premium, and Business plans, OAuth is the only authentication method, so clients without OAuth support cannot connect. * **Provisioning, team management, and webhooks are API-only** — See [MCP and the REST API](#mcp-and-the-rest-api). * **No account creation** — New user accounts must be created through the [Fax.Plus web dashboard](https://app.fax.plus). * **No public sandbox** — Contact [support@alohi.com](mailto:support@alohi.com) to request a test environment. * **File size limits** — Uploaded files are subject to size limits. Large documents should be split before uploading. * **Rate limits** — Requests are rate-limited. See the [API documentation](https://apidoc.fax.plus) for current thresholds. * **Fax delivery** — Transmission success depends on the recipient's fax machine availability and line quality. Automatic retries can be configured when sending. *** ## Troubleshooting ### Connection rejected on a HIPAA or PHIPA account This is expected. Advanced Security Controls block third-party MCP clients from accessing the account. Use the [REST API](https://apidoc.fax.plus) directly for programmatic access on these accounts, or contact [support@alohi.com](mailto:support@alohi.com) to discuss options. ### Connection rejected on the Free plan The MCP Server requires a paid plan. Upgrade to Basic or higher from [your account](https://app.fax.plus) and reconnect. ### My assistant can't buy a number, add a teammate, or set up a webhook These operations aren't exposed as MCP tools by design. Use the [REST API](https://apidoc.fax.plus), or the [Fax.Plus dashboard](https://app.fax.plus) for number purchases, team management, and webhook configuration. See [MCP and the REST API](#mcp-and-the-rest-api). ### "Invalid token" or 401 Unauthorized If you connected via OAuth, your session may have expired or been revoked — remove the connector from your client and authorize again. If you connected with a PAT, the token may have expired or lack the required scopes. Generate a new token from **Settings → Integrations → Personal Access Tokens** in your Fax.Plus dashboard. Ensure it includes at least `fax:all:read` for read operations and `fax:all:edit` for sending faxes. ### Personal Access Tokens option is missing from Settings PATs are available on the Enterprise plan only. On Basic, Premium, and Business, connect via OAuth using an OAuth-capable MCP client. ### Fax stuck in outbox or delivery failed Check that the recipient's fax number is in E.164 format (e.g., `+12125550199`). Verify the number is a working fax line. You can configure automatic retries with the `retry` parameter when sending. ### 403 Forbidden on member endpoints Only corporate admin accounts can read member details. Verify your account has the `corporate_admin` role. ### "invalid\_redirect\_uri" during OAuth setup Dynamic Client Registration rejects any `redirect_uri` that isn't on the server's allowlist. This is expected for MCP clients that haven't been vetted yet — contact [support@alohi.com](mailto:support@alohi.com) to request that your client be added. ### Claude Desktop ignores my MCP server or removes it from the config You likely used `"type": "url"` in `claude_desktop_config.json`. Claude Desktop only supports stdio servers there. Add the server via **Settings → Connectors** instead, or use the [`mcp-remote` configuration](#claude-desktop-with-a-pat-enterprise-only) if you're on Enterprise with a PAT. ### Getting help * **Help Center:** [help.alohi.com](https://help.alohi.com) * **API Support:** [support@alohi.com](mailto:support@alohi.com) * **Enterprise Sales:** [alohi.com/contact-sales](https://www.alohi.com/contact-sales) # Introduction Source: https://apidoc.fax.plus/get-started/introduction Integrate online fax functionalities in your workflow Introducing Fax.Plus API ## Programmable Fax API Fax.Plus API is made for third-party developers and organizations to send and receive faxes from their own system. Get started with Fax.Plus API in minutes Get detailed endpoint information and examples Learn how to use Fax.Plus API in different scenarios # Quickstart Source: https://apidoc.fax.plus/get-started/quickstart Start sending faxes in 4 steps Quickstart Fax.Plus API is available for enterprise plan only Please sign up on the [Fax.Plus Platform](https://app.fax.plus) to get started. Please visit the [Integrations](https://app.fax.plus/profile/integrations) page to get your API key. To send a fax, you need to upload a file to the Fax.Plus server. The file can be in PDF, TIFF, Word, Excel, RTF or image format. ```js theme={null} const axios = require('axios'); const fs = require('fs') const FilesApiFp = require('@alohi/faxplus-api').FilesApiFp; 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 uploadFile() { const reqParams = { "format": 'tiff', "userId": '13d8z73c', "faxFile": fs.createReadStream(FILE_PATH) } const req = await FilesApiFp(config).uploadFile(reqParams); const resp = await req(axios); } uploadFile() ``` ```python theme={null} from faxplus import ApiClient, FilesApi 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 = FilesApi(api_client) resp = api.upload_file( format='tiff', user_id='13d8z73c', fax_file='/path/to/file.pdf' ) ``` ```java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); pathParams.put("fax_id", "'132esd4cs31'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}"); String result = Request .Get(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "{client-id}") .addHeader("Accept", "'application/pdf'") .addHeader("Authorization", "''Bearer {access-token}''") .execute() .returnContent().asString(); System.out.println(result.toString()); ``` ```go theme={null} package main import ( "bytes" "net/http" ) func main() { 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/pdf"}, "Authorization": []string{"Bearer {access-token}"}, "x-fax-clientid": []string{"{client-id}"} } data := bytes.NewBuffer([]byte{jsonReq}) req, err := http.NewRequest("GET", "https://restapi.fax.plus/v3/accounts/{user_id}/report/{fax_id}", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } } ``` ```php theme={null} 'application/json', 'Authorization' => 'Bearer {access-token}', '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) { print_r($e->getMessage()); } ``` ```bash theme={null} # You can also use wget curl -X GET https://restapi.fax.plus/v3/accounts/{user_id}/files/{fax_id} \ -H 'Accept: application/pdf' \ -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"' ``` Once the file is uploaded, you will receive a `path` in the response. You will need this `path` to send a fax. ```bash theme={null} { "path": "/storage/2937237320213-213-21323" } ``` To send a fax, you need to provide the recipient's fax number and the file path you received in the previous step. ```js theme={null} const axios = require('axios'); const OutboxApiFp = require('@alohi/faxplus-api').OutboxApiFp; 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 sendFax() { const reqParams = { "userId": '13d8z73c', "payloadOutbox": { "comment": { "tags": [ "tag1", "tag2" ], "text": "text comment" }, "files": [ "filetosend.pdf" ], "from": "+12345667", "options": { "enhancement": true, "retry": { "count": 2, "delay": 15 } }, "send_time": "2000-01-01 01:02:03 +0000", "to": [ "+12345688", "+12345699" ], "return_ids": true } } const req = await OutboxApiFp(config).sendFax(reqParams); const resp = await req(axios); } sendFax() ``` ```python theme={null} from faxplus import ApiClient, OutboxApi, OutboxComment, RetryOptions, OutboxOptions, OutboxCoverPage, PayloadOutbox from faxplus.configuration import Configuration outbox_comment = OutboxComment(tags=['tag1', 'tag2'], text='text comment') retry_options = RetryOptions(count=2, delay=15) outbox_options = OutboxOptions(enhancement=True, retry=retry_options) outbox_cover_page = OutboxCoverPage(include_company_logo=True) payload_outbox = PayloadOutbox(from='+12345667', to=['+12345688', '+12345699'], files=['filetosend.pdf'], comment=outbox_comment, options=outbox_options, send_time='2000-01-01 01:02:03 +0000', return_ids=True, cover_page=outbox_cover_page) 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 = OutboxApi(api_client) resp = api.send_fax( user_id='13d8z73c', body=payload_outbox ) ``` ```java theme={null} /** * Example below uses Apache HTTP Client 4 with Fluent API **/ Map pathParams = new HashMap<>(); pathParams.put("user_id", "'13d8z73c'"); StrSubstitutor sub = new StrSubstitutor(values, "{", "}"); String url = sub.replace("https://restapi.fax.plus/v3/accounts/{user_id}/outbox"); String jsonBody = ...; // See request body example String result = Request .Post(url) // The x-fax-clientid header is required only when using the OAuth2 token scheme .addHeader("x-fax-clientid", "YOUR CLIENT_ID") .addHeader("Content-Type", "'application/json'") .addHeader("Accept", "'application/json'") .addHeader("Authorization", "'Bearer {access-token}'") .bodyString(jsonBody, "application/json") .execute() .returnContent().asString(); System.out.println(result); ``` ```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 "Content-Type": []string{"application/json"}, "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("POST", "https://restapi.fax.plus/v3/accounts/{user_id}/outbox", data) req.Header = headers client := &http.Client{} resp, err := client.Do(req) // ... } ``` ```php theme={null} '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(); // Define array of request body. $request_body = ...; // See request body example try { $response = $client->request('POST','https://restapi.fax.plus/v3/accounts/{user_id}/outbox', array( 'headers' => $headers, 'json' => $request_body, ) ); print_r($response->getBody()->getContents()); } catch (GuzzleHttp\Exception\BadResponseException $e) { // handle exception or api errors. print_r($e->getMessage()); } // ... ``` ```bash theme={null} # You can also use wget curl -X POST https://restapi.fax.plus/v3/accounts/{user_id}/outbox \ -H 'Content-Type: application/json' \ -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"' ``` On success, the API will return a response with return a list of fax IDs. Each fax ID represents a fax that was sent to a recipient. ```bash theme={null} { "ids": { "+1234567890": "1a2b3c4d5e6f7890", "+1345678912": "78901a2b3c4d5e6f" } } ``` ## Go further * Get notified when the fax status changes with [webhooks](/concepts/webhook) * Explore our API [online](/api-reference) or download the reference in the [OpenAPI](/api-reference/openapi.json) format