NAV Navbar
Shell HTTP JavaScript Ruby Python PHP Java Go

FAX.PLUS REST API v1.2.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

This is the FAX.PLUS API v1 developed for third party developers and organizations. In order to have a better coding experience with this API, let's quickly go through some points:

- This API assumes /accounts as an entry point with the base url of https://restapi.fax.plus/v1.

- This API treats all date and times sent to it in requests as UTC. Also, all dates and times returned in responses are in UTC

- Once you have an access_token, you can easily send a request to the resource server with the base url of https://restapi.fax.plus/v1 to access your permitted resources. As an example to get the user's profile info you would send a request to https://restapi.fax.plus/v1/accounts/self when Authorization header is set to Bearer YOUR_ACCESS_TOKEN and custom header of x-fax-clientid is set to YOUR_CLIENT_ID

Base URLs:

Email: FAX.PLUS Web: FAX.PLUS

Authentication

FAX.PLUS API employs the OAuth2 authentication flow for getting and refreshing the authentication token.

Authorization Code Grant

The first step is to obtain an authorization code. Redirect the user to the URL https://accounts.fax.plus/login providing the following query parameters:

https://accounts.fax.plus/login?response_type=code&client_id=CLIENT_ID&redirect_uri=URI&scope=all

Let's assume we have 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

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 with the following parameters:

If the request was successful, you will be granted an access token in JSON format.

{
 "access_token": "token:token",
 "expires_in": 3600,
 "refresh_token": "token:token",
 "token_type": "Bearer"
}

Refreshing An Access Token

To renew your access token, make an HTTP POST request to the base URL 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 same the 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.

Accounts

getAccounts

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts'
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts',
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/accounts', 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());
 }

 // ...

String url = "https://restapi.fax.plus/v1/accounts";
String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts

Get account information of all non-admin members of your corporate account.

Only admin account can send request to this endpoint which returns accounts of all members

Example responses

200 Response

{
  "members": [
    {
      "account_data": {
        "company_name": "Company name",
        "default_file_type": "pdf",
        "save_history": true
      },
      "account_type": "corporate_admin",
      "creation_date": "2017-05-06 05:22:21",
      "email": "[email protected]",
      "last_password_modification_date": "2017-05-06 05:22:21",
      "lastname": "Smith",
      "member_of": {},
      "notifications": {
        "black_list": {
          "uids": []
        },
        "settings": {
          "email": {
            "addresses": [
              "[email protected]"
            ],
            "low_credit": true,
            "new_feature": true,
            "receive_fax": true,
            "send_fax": true,
            "voicemail": true
          },
          "language": "fa",
          "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",
      "profile_image": "",
      "settings": {
        "caller_id_name": "FAX.PLUS",
        "send_fax": {
          "options": {},
          "retry": {
            "count": 0,
            "delay": 0
          },
          "should_enhance": true
        }
      },
      "status": "active",
      "uid": "7724157c0974440293e45877c57f0703"
    }
  ]
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

401 Response

{
  "error": "unauthorized",
  "description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Object containing account information AccountList
400 Bad Request Error object in case there's a problem with given data Error
401 Unauthorized Error object in case there's a problem with the authorization Error
500 Internal Server Error Error object in case there's a server error Error

getUser

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/{user_id} \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/{user_id} HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/{user_id}'
url = url.replace('user_id', '473e1eb6')
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/{user_id}'
url['user_id'] = '473e1eb6'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/{user_id}'
    .replace('{user_id}', '473e1eb6'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "473e1eb6");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/{user_id}");

String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/{user_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/{user_id}

Get account information for admin or member

Get account information. For members user_id can only be self. For admin it can be user_id of any corporate member

Parameters

Name In Type Required Description
user_id path string true User ID to get information about. For your own account use 'self'

Example responses

200 Response

{
  "account_data": {
    "company_name": "Company name",
    "default_file_type": "pdf",
    "save_history": true
  },
  "account_type": "corporate_admin",
  "creation_date": "2017-05-06 05:22:21",
  "email": "[email protected]",
  "last_password_modification_date": "2017-05-06 05:22:21",
  "lastname": "Smith",
  "member_of": {},
  "notifications": {
    "black_list": {
      "uids": []
    },
    "settings": {
      "email": {
        "addresses": [
          "[email protected]"
        ],
        "low_credit": true,
        "new_feature": true,
        "receive_fax": true,
        "send_fax": true,
        "voicemail": true
      },
      "language": "fa",
      "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",
  "profile_image": "",
  "settings": {
    "caller_id_name": "FAX.PLUS",
    "send_fax": {
      "options": {},
      "retry": {
        "count": 0,
        "delay": 0
      },
      "should_enhance": true
    }
  },
  "status": "active",
  "uid": "7724157c0974440293e45877c57f0703"
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

401 Response

{
  "error": "unauthorized",
  "description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Object containing account information Account
400 Bad Request Error object in case there's a problem with given data Error
401 Unauthorized Error object in case there's a problem with the authorization Error
500 Internal Server Error Error object in case there's a server error Error

updateUser

Code samples

# You can also use wget
curl -X PUT https://restapi.fax.plus/v1/accounts/self \
  -H 'Content-Type: application/json'  \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

PUT https://restapi.fax.plus/v1/accounts/self HTTP/1.1
Host: restapi.fax.plus
Content-Type: application/json
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self'
$.ajax({
  url: url,
  method: 'put',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self'
result = RestClient.put url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.put('https://restapi.fax.plus/v1/accounts/self',
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://restapi.fax.plus/v1/accounts/self', 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());
 }

 // ...

String url = "https://restapi.fax.plus/v1/accounts/self";
String result = Request
    .Put(url)
    .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());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /accounts/self

Modify account information

Modify personal information of your account

Body parameter

{
  "account_data": {
    "company_name": "Company name",
    "default_file_type": "pdf",
    "save_history": true
  },
  "account_type": "corporate_admin",
  "creation_date": "2017-05-06 05:22:21",
  "email": "[email protected]",
  "last_password_modification_date": "2017-05-06 05:22:21",
  "lastname": "Smith",
  "member_of": {},
  "notifications": {
    "black_list": {
      "uids": []
    },
    "settings": {
      "email": {
        "addresses": [
          "[email protected]"
        ],
        "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",
  "profile_image": "",
  "settings": {
    "caller_id_name": "FAX.PLUS",
    "send_fax": {
      "options": {},
      "retry": {
        "count": 0,
        "delay": 0
      },
      "should_enhance": true
    }
  },
  "status": "active",
  "uid": "7724157c0974440293e45877c57f0703"
}

Parameters

Name In Type Required Description
body body PayloadAccountModification false Request object for making changes in account

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
204 No Content Modify account information None
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

getMemberDetails

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id} \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id} HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id}'
url = url.replace('member_user_id', '473e1eb612451s')
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id}'
url['member_user_id'] = '473e1eb612451s'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id}'
    .replace('{member_user_id}', '473e1eb612451s'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("member_user_id", "473e1eb612451s");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id}");

String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/member-details/{member_user_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/self/member-details/{member_user_id}

Get member details

Get your member details (quota and role)

Parameters

Name In Type Required Description
member_user_id path string true Member user ID

Example responses

200 Response

{
  "quota": 400,
  "role": "Sales Manager"
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

401 Response

{
  "error": "unauthorized",
  "description": "The access token provided is expired, revoked, malformed, or invalid for other reasons."
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Object containing details of member (quota and role) MemberDetail
400 Bad Request Error object in case there's a problem with given data Error
401 Unauthorized Error object in case there's a problem with the authorization Error
500 Internal Server Error Error object in case there's a server error Error

updateMemberDetails

Code samples

# You can also use wget
curl -X PUT https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id} \
  -H 'Content-Type: application/json'  \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

PUT https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id} HTTP/1.1
Host: restapi.fax.plus
Content-Type: application/json
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id}'
url = url.replace('member_user_id', '473e1e2fs1b6')
$.ajax({
  url: url,
  method: 'put',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id}'
url['member_user_id'] = '473e1e2fs1b6'
result = RestClient.put url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.put('https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id}'
    .replace('{member_user_id}', '473e1e2fs1b6'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://restapi.fax.plus/v1/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("member_user_id", "473e1e2fs1b6");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/member-details/{member_user_id}");

String result = Request
    .Put(url)
    .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());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/member-details/{member_user_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /accounts/self/member-details/{member_user_id}

Modify member details

One of the parameters below is needed to modify member information

Body parameter

{
  "quota": 400,
  "role": "Sales Manager"
}

Parameters

Name In Type Required Description
member_user_id path string true Member user ID
body body MemberDetail false Request object for making changes in member details

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
204 No Content Modify account information None
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

Numbers

listNumbers

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/self/numbers \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/self/numbers HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/numbers'
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/numbers'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/self/numbers',
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/accounts/self/numbers', 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());
 }

 // ...

String url = "https://restapi.fax.plus/v1/accounts/self/numbers";
String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/numbers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/self/numbers

Get your numbers

List all your purchased numbers

Example responses

200 Response

{
  "numbers": [
    {
      "acquired_date": "2017-07-31 09:20:06",
      "assigned_to": [
        "7724157c0974440293e45877c57f0703"
      ],
      "expiration_date": null,
      "id": "e6e68ef87f0b8768ebacdb218994bfe7",
      "is_canceled": false,
      "notifications": [
        {
          "email": true,
          "push_notification": true,
          "type": "voicemail"
        },
        {
          "email": true,
          "push_notification": true,
          "type": "receive_fax"
        },
        {
          "email": true,
          "push_notification": true,
          "type": "announcement"
        },
        {
          "email": true,
          "push_notification": true,
          "type": "callforward"
        }
      ],
      "number": "+16699990000",
      "owner_id": "7724157c0974440293e45877c57f0703",
      "status": "active"
    }
  ]
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Response containing a list of number objects NumberList
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

getNumber

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/self/numbers/{number} \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/self/numbers/{number} HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/numbers/{number}'
url = url.replace('number', '+123417543010')
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/numbers/{number}'
url['number'] = '+123417543010'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/self/numbers/{number}'
    .replace('{number}', '+123417543010'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/accounts/self/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("number", "+123417543010");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/numbers/{number}");

String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/numbers/{number}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/self/numbers/{number}

Get number information

Get info of a single number

Parameters

Name In Type Required Description
number path string true Phone number to get information about

Example responses

200 Response

{
  "acquired_date": "2017-07-31 09:20:06",
  "assigned_to": [
    "7724157c0974440293e45877c57f0703"
  ],
  "expiration_date": null,
  "id": "e6e68ef87f0b8768ebacdb218994bfe7",
  "is_canceled": false,
  "notifications": [
    {
      "email": true,
      "push_notification": true,
      "type": "voicemail"
    },
    {
      "email": true,
      "push_notification": true,
      "type": "receive_fax"
    },
    {
      "email": true,
      "push_notification": true,
      "type": "announcement"
    },
    {
      "email": true,
      "push_notification": true,
      "type": "callforward"
    }
  ],
  "number": "+16699990000",
  "owner_id": "7724157c0974440293e45877c57f0703",
  "status": "active"
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

404 Response

{
  "error": "bad_request",
  "description": "Requested resource was not found."
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Object containing number information Number
400 Bad Request Error object in case there's a problem with given data Error
404 Not Found Requested resource was not found Error
500 Internal Server Error Error object in case there's a server error Error

updateNumber

Code samples

# You can also use wget
curl -X PUT https://restapi.fax.plus/v1/accounts/self/numbers/{number} \
  -H 'Content-Type: application/json'  \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

PUT https://restapi.fax.plus/v1/accounts/self/numbers/{number} HTTP/1.1
Host: restapi.fax.plus
Content-Type: application/json
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/numbers/{number}'
url = url.replace('number', '+123417543010')
$.ajax({
  url: url,
  method: 'put',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/numbers/{number}'
url['number'] = '+123417543010'
result = RestClient.put url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.put('https://restapi.fax.plus/v1/accounts/self/numbers/{number}'
    .replace('{number}', '+123417543010'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://restapi.fax.plus/v1/accounts/self/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("number", "+123417543010");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/numbers/{number}");

String result = Request
    .Put(url)
    .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());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/numbers/{number}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /accounts/self/numbers/{number}

Assign number

With this API call you will be able to assign a specific number to a specific account (one of your members).

Body parameter

{
  "assigned_to": "string"
}

Parameters

Name In Type Required Description
number path string true Phone number to update
body body PayloadNumberModification false Request object for making changes in number object

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
204 No Content Assign an already purchased number to your members None
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

revokeNumber

Code samples

# You can also use wget
curl -X DELETE https://restapi.fax.plus/v1/accounts/{user_id}/numbers/{number} \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

DELETE https://restapi.fax.plus/v1/accounts/{user_id}/numbers/{number} HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/{user_id}/numbers/{number}'
url = url.replace('number', '+123417543010')
url = url.replace('user_id', '23415ufasx8df7')
$.ajax({
  url: url,
  method: 'delete',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/{user_id}/numbers/{number}'
url['number'] = '+123417543010'
url['user_id'] = '23415ufasx8df7'
result = RestClient.delete url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.delete('https://restapi.fax.plus/v1/accounts/{user_id}/numbers/{number}'
    .replace('{number}', '+123417543010')
    .replace('{user_id}', '23415ufasx8df7'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://restapi.fax.plus/v1/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("number", "+123417543010");
pathParams.put("user_id", "23415ufasx8df7");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/{user_id}/numbers/{number}");

String result = Request
    .Delete(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/{user_id}/numbers/{number}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /accounts/{user_id}/numbers/{number}

Revoke number

Revoke a specific number from a member
In case you want to revoke your own number please use self as an alias for your user_id.

Parameters

Name In Type Required Description
number path string true Phone number to remove members from
user_id path string true ID of the user to revoke the number from. Number can not be removed from the admin

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
204 No Content Revoke number from member that owns fax number None
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

Archives

listFaxes

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/{user_id}/archives \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/{user_id}/archives HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/{user_id}/archives'
url = url.replace('user_id', '13d8z73c')
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/{user_id}/archives'
url['user_id'] = '13d8z73c'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/{user_id}/archives'
    .replace('{user_id}', '13d8z73c'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/accounts/{user_id}/archives', 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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("user_id", "13d8z73c");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/{user_id}/archives");

String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/{user_id}/archives", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/{user_id}/archives

Get fax records

With this API call you will be able to retrieve a collection of faxes (either sent or received or spam based on the category selected). If you want to filter your archive please provide the category parameter

Parameters

Name In Type Required Description
user_id path string true 'self' or user id of a corporate member
category query FaxCategory false Category parameter. Valid values: inbox, sent, spam
after query string false Start date to get records from that date. Format: YYYY-MM-DD HH:mm:ss
before query string false End date to get records before that date. Format: YYYY-MM-DD HH:mm:ss
limit query integer false Limit of fax records you want to get per request

Enumerated Values

Parameter Value
category inbox
category sent
category spam

Example responses

200 Response

{
  "data": {
    "records": [
      {
        "comment": "",
        "cost": 2,
        "cost_details": {
          "multiplier": 1,
          "notification_cost": 0
        },
        "description": "OK",
        "direction": "incoming",
        "duration": 0,
        "file": "ec28edc283a74daca1787efb5fa6fae2.tiff",
        "file_name": "fax-from-12076001783",
        "from_number": "+12076001783",
        "header": null,
        "id": "5e7de3ad54cfd54eb568cc76",
        "is_read": false,
        "is_spam": false,
        "last_update": "2020-03-27 11:29:49",
        "max_retry": null,
        "owner_id": "74d59d2779fb42a99cd5bb993c0c89d2",
        "pages": 2,
        "retry_delay": null,
        "scheduled_time": null,
        "start_time": "2020-03-27 11:29:21",
        "status": "failed",
        "submit_time": null,
        "to": "+12076001783"
      }
    ]
  }
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Response containing a list of faxes FaxList
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

getFax

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/self/archives/{fax_id} \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/self/archives/{fax_id} HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
url = url.replace('fax_id', '132esd4cs31')
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
url['fax_id'] = '132esd4cs31'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
    .replace('{fax_id}', '132esd4cs31'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/accounts/self/archives/{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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("fax_id", "132esd4cs31");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}");

String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/archives/{fax_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/self/archives/{fax_id}

Get a fax record

Get a specific fax record details like duration, pages etc.

Parameters

Name In Type Required Description
fax_id path string true none

Example responses

200 Response

{
  "comment": "",
  "cost": 2,
  "cost_details": {
    "multiplier": 1,
    "notification_cost": 0
  },
  "description": "OK",
  "direction": "incoming",
  "duration": 0,
  "file": "ec28edc283a74daca1787efb5fa6fae2.tiff",
  "file_name": "fax-from-12076001783",
  "from_number": "+12076001783",
  "header": null,
  "id": "5e7de3ad54cfd54eb568cc76",
  "is_read": false,
  "is_spam": false,
  "last_update": "2020-03-27 11:29:49",
  "max_retry": null,
  "owner_id": "74d59d2779fb42a99cd5bb993c0c89d2",
  "pages": 2,
  "retry_delay": null,
  "scheduled_time": null,
  "start_time": "2020-03-27 11:29:21",
  "status": "failed",
  "submit_time": null,
  "to": "+12076001783"
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

404 Response

{
  "error": "bad_request",
  "description": "Requested resource was not found."
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Response containing a single fax object Fax
400 Bad Request Error object in case there's a problem with given data Error
404 Not Found Requested resource was not found Error
500 Internal Server Error Error object in case there's a server error Error

updateFax

Code samples

# You can also use wget
curl -X PUT https://restapi.fax.plus/v1/accounts/self/archives/{fax_id} \
  -H 'Content-Type: application/json'  \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

PUT https://restapi.fax.plus/v1/accounts/self/archives/{fax_id} HTTP/1.1
Host: restapi.fax.plus
Content-Type: application/json
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
url = url.replace('fax_id', '132esd4cs31')
$.ajax({
  url: url,
  method: 'put',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
url['fax_id'] = '132esd4cs31'
result = RestClient.put url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.put('https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
    .replace('{fax_id}', '132esd4cs31'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://restapi.fax.plus/v1/accounts/self/archives/{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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("fax_id", "132esd4cs31");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}");

String result = Request
    .Put(url)
    .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());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/archives/{fax_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /accounts/self/archives/{fax_id}

Modify fax record

You can modify a fax record's comment or mark it as read

Body parameter

{
  "comment": "string",
  "is_read": true
}

Parameters

Name In Type Required Description
fax_id path string true none
body body PayloadFaxModification false Request object for making changes in a fax object

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
204 No Content Fax updated successfully None
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

deleteFax

Code samples

# You can also use wget
curl -X DELETE https://restapi.fax.plus/v1/accounts/self/archives/{fax_id} \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

DELETE https://restapi.fax.plus/v1/accounts/self/archives/{fax_id} HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
url = url.replace('fax_id', '132esd4cs31')
$.ajax({
  url: url,
  method: 'delete',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
url['fax_id'] = '132esd4cs31'
result = RestClient.delete url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.delete('https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}'
    .replace('{fax_id}', '132esd4cs31'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://restapi.fax.plus/v1/accounts/self/archives/{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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("fax_id", "132esd4cs31");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/archives/{fax_id}");

String result = Request
    .Delete(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/archives/{fax_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /accounts/self/archives/{fax_id}

Delete a fax

Delete a specific fax record by providing its id

Parameters

Name In Type Required Description
fax_id path string true none

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

404 Response

{
  "error": "bad_request",
  "description": "Requested resource was not found."
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
204 No Content 204 will be return on successful CDR modification None
400 Bad Request Error object in case there's a problem with given data Error
404 Not Found Requested resource was not found Error
500 Internal Server Error Error object in case there's a server error Error

Response Schema

Files

uploadFile

Code samples

# You can also use wget
curl -X POST https://restapi.fax.plus/v1/accounts/self/files \
  -H 'Content-Type: multipart/form-data'  \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

POST https://restapi.fax.plus/v1/accounts/self/files HTTP/1.1
Host: restapi.fax.plus
Content-Type: multipart/form-data
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Content-Type':'multipart/form-data',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/files'
$.ajax({
  url: url,
  method: 'post',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'multipart/form-data',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/files'
result = RestClient.post url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.post('https://restapi.fax.plus/v1/accounts/self/files',
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'multipart/form-data',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://restapi.fax.plus/v1/accounts/self/files', 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());
 }

 // ...

String url = "https://restapi.fax.plus/v1/accounts/self/files";
String result = Request
    .Post(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Content-Type", "'multipart/form-data'")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .bodyString(jsonBody, application/json)
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"multipart/form-data"},
        "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/v1/accounts/self/files", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /accounts/self/files

upload a file

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. If the upload was successful you would receive a file_path which you can use to send your fax.

Body parameter

fax_file: string

Parameters

Name In Type Required Description
format query FileType false Can be 'pdf' or 'tiff'
body body File true A file to be uploaded

Enumerated Values

Parameter Value
format tiff
format pdf

Example responses

201 Response

{
  "path": "/storage/2937237320213-213-21323"
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
201 Created Simple object containing path of created file FilePath
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

getFile

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/self/files/{fax_id} \
  -H 'Accept: application/pdf'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/self/files/{fax_id} HTTP/1.1
Host: restapi.fax.plus
Accept: application/pdf
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/pdf',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/files/{fax_id}'
url = url.replace('fax_id', '132esd4cs31')
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/pdf',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/files/{fax_id}'
url['fax_id'] = '132esd4cs31'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/pdf',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/self/files/{fax_id}'
    .replace('{fax_id}', '132esd4cs31'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/pdf',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/accounts/self/files/{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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("fax_id", "132esd4cs31");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/files/{fax_id}");

String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/pdf'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/files/{fax_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/self/files/{fax_id}

get a file

Get your fax archive file using it's id.

Parameters

Name In Type Required Description
fax_id path string true ID of the fax which you want to download
format query FileType false Can be 'pdf' or 'tiff'

Enumerated Values

Parameter Value
format tiff
format pdf

Example responses

200 Response

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK CDR file content in corresponding mimetype e.g. application/pdf Binary
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

Outbox

listOutboxFaxes

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/self/outbox \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/self/outbox HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/outbox'
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/outbox'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/self/outbox',
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/accounts/self/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());
 }

 // ...

String url = "https://restapi.fax.plus/v1/accounts/self/outbox";
String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/outbox", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/self/outbox

Get list of faxes in the outbox

Get list of the faxes in the outbox which were not yet sent

Example responses

200 Response

{
  "records": [
    {
      "comment": {
        "tags": [],
        "text": ""
      },
      "contact_name": "",
      "designated_src": "",
      "extra_info": {},
      "file_changes": [],
      "files": [
        "/transient-29362c0c-eeff-45c1-9f4e-4ef5865a41df"
      ],
      "id": "13a4afb0585345639733857e8f36df8d",
      "initiated_from": {
        "from_id": "",
        "type": ""
      },
      "ip": "8.8.8.8",
      "last_updated_status_time": "2017-09-24 06:43:04",
      "options": {},
      "page_count": 0,
      "retry": {
        "count": 0,
        "delay": 0
      },
      "send_time": "2017-09-24 06:43:04 +0000",
      "should_enhance": false,
      "src": "+16699990000",
      "status": "submitted",
      "status_changes": [
        {
          "at": "2017-09-24 06:43:04",
          "status": "submitted"
        }
      ],
      "submit_time": "2017-09-24 06:43:04 +0000",
      "to": [
        "+16699990000"
      ],
      "uid": "53a1afb8585345a39033857e1f36bf8d"
    }
  ]
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Response containing a list of faxes waiting to be sent OutboxList
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

sendFax

Code samples

# You can also use wget
curl -X POST https://restapi.fax.plus/v1/accounts/self/outbox \
  -H 'Content-Type: application/json'  \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

POST https://restapi.fax.plus/v1/accounts/self/outbox HTTP/1.1
Host: restapi.fax.plus
Content-Type: application/json
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/outbox'
$.ajax({
  url: url,
  method: 'post',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/outbox'
result = RestClient.post url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.post('https://restapi.fax.plus/v1/accounts/self/outbox',
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','https://restapi.fax.plus/v1/accounts/self/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());
 }

 // ...

String url = "https://restapi.fax.plus/v1/accounts/self/outbox";
String result = Request
    .Post(url)
    .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());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/outbox", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /accounts/self/outbox

Send a fax

With this API call you will be able to send a fax (one or more files) to one or more destinations. If you are a corporate member and you don't have a fax number set your from parameter to NO_NUMBER

Body parameter

{
  "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",
  "to": [
    "+12345688",
    "+12345699"
  ]
}

Parameters

Name In Type Required Description
body body PayloadOutbox false Request to send new outbound fax

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
201 Created Outbox fax has been created successfully None
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

getOutboxFax

Code samples

# You can also use wget
curl -X GET https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id} \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

GET https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id} HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
url = url.replace('outbox_fax_id', '132esd4cs31')
$.ajax({
  url: url,
  method: 'get',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
url['outbox_fax_id'] = '132esd4cs31'
result = RestClient.get url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.get('https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
    .replace('{outbox_fax_id}', '132esd4cs31'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://restapi.fax.plus/v1/accounts/self/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("outbox_fax_id", "132esd4cs31");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}");

String result = Request
    .Get(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/outbox/{outbox_fax_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /accounts/self/outbox/{outbox_fax_id}

Get an outbox record

Get an outbox fax record information

Parameters

Name In Type Required Description
outbox_fax_id path string true ID of the outgoing fax to get

Example responses

200 Response

{
  "comment": {
    "tags": [],
    "text": ""
  },
  "contact_name": "",
  "designated_src": "",
  "extra_info": {},
  "file_changes": [],
  "files": [
    "/transient-29362c0c-eeff-45c1-9f4e-4ef5865a41df"
  ],
  "id": "13a4afb0585345639733857e8f36df8d",
  "initiated_from": {
    "from_id": "",
    "type": ""
  },
  "ip": "8.8.8.8",
  "last_updated_status_time": "2017-09-24 06:43:04",
  "options": {},
  "page_count": 0,
  "retry": {
    "count": 0,
    "delay": 0
  },
  "send_time": "2017-09-24 06:43:04 +0000",
  "should_enhance": false,
  "src": "+16699990000",
  "status": "submitted",
  "status_changes": [
    {
      "at": "2017-09-24 06:43:04",
      "status": "submitted"
    }
  ],
  "submit_time": "2017-09-24 06:43:04 +0000",
  "to": [
    "+16699990000"
  ],
  "uid": "53a1afb8585345a39033857e1f36bf8d"
}

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
200 OK Response containing a single outbox object Outbox
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

deleteOutboxFax

Code samples

# You can also use wget
curl -X DELETE https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id} \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

DELETE https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id} HTTP/1.1
Host: restapi.fax.plus
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
url = url.replace('outbox_fax_id', '132esd4cs31')
$.ajax({
  url: url,
  method: 'delete',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
url['outbox_fax_id'] = '132esd4cs31'
result = RestClient.delete url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.delete('https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
    .replace('{outbox_fax_id}', '132esd4cs31'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','https://restapi.fax.plus/v1/accounts/self/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("outbox_fax_id", "132esd4cs31");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}");

String result = Request
    .Delete(url)
    .addHeader("x-fax-clientid", "YOUR_CLIENT_ID")
    .addHeader("Accept", "'application/json'")
    .addHeader("Authorization", "'Bearer {access-token}'")
    .execute()
    .returnContent().asString();

System.out.println(result.toString());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/outbox/{outbox_fax_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /accounts/self/outbox/{outbox_fax_id}

Delete a fax from outbox

Delete a fax that is being sent and is still in your outbox

Parameters

Name In Type Required Description
outbox_fax_id path string true ID of the outgoing fax to delete

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
204 No Content 204 will be returned on successful fax deletion from outbox None
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

updateOutboxFax

Code samples

# You can also use wget
curl -X PUT https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id} \
  -H 'Content-Type: application/json'  \
  -H 'Accept: application/json'  \
  -H 'Authorization: Bearer {access-token}' \
  -H 'x-fax-clientid: "YOUR_CLIENT_ID"'

PUT https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id} HTTP/1.1
Host: restapi.fax.plus
Content-Type: application/json
Accept: application/json
x-fax-clientid: YOUR_CLIENT_ID

var headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}',
  'x-fax-clientid':'YOUR_CLIENT_ID'
};

var url = 'https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
url = url.replace('outbox_fax_id', '132esd4cs31')
$.ajax({
  url: url,
  method: 'put',
  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}',
  'x-fax-clientid' => 'YOUR_CLIENT_ID'
}

url = 'https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
url['outbox_fax_id'] = '132esd4cs31'
result = RestClient.put url,
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}',
  'x-fax-clientid': 'YOUR_CLIENT_ID'
}
r = requests.put('https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}'
    .replace('{outbox_fax_id}', '132esd4cs31'),
    params={
}, headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',

    );

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://restapi.fax.plus/v1/accounts/self/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());
 }

 // ...

Map<String, String> pathParams = new HashMap<>();
pathParams.put("outbox_fax_id", "132esd4cs31");
StrSubstitutor sub = new StrSubstitutor(values, "{", "}");
String url = sub.replace("https://restapi.fax.plus/v1/accounts/self/outbox/{outbox_fax_id}");

String result = Request
    .Put(url)
    .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());
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "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/v1/accounts/self/outbox/{outbox_fax_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /accounts/self/outbox/{outbox_fax_id}

Modify a fax record in outbox

Modify outbox record's comment

Body parameter

{
  "comment": "string"
}

Parameters

Name In Type Required Description
outbox_fax_id path string true ID of the outgoing fax to update
body body PayloadOutboxModification false Request object for making changes in an outbox object

Example responses

400 Response

{
  "error": "invalid_user_id",
  "description": "Invalid user id given"
}

500 Response

{
  "error": "internal_server_error",
  "description": "An unexpected error happened, please contact support"
}

Responses

Status Meaning Description Schema
204 No Content 204 will be returned on successful fax modification in outbox None
400 Bad Request Error object in case there's a problem with given data Error
500 Internal Server Error Error object in case there's a server error Error

Schemas

Account

{
  "account_data": {
    "company_name": "Company name",
    "default_file_type": "pdf",
    "save_history": true
  },
  "account_type": "corporate_admin",
  "creation_date": "2017-05-06 05:22:21",
  "email": "[email protected]",
  "last_password_modification_date": "2017-05-06 05:22:21",
  "lastname": "Smith",
  "member_of": {},
  "notifications": {
    "black_list": {
      "uids": []
    },
    "settings": {
      "email": {
        "addresses": [
          "[email protected]"
        ],
        "low_credit": true,
        "new_feature": true,
        "receive_fax": true,
        "send_fax": true,
        "voicemail": true
      },
      "language": "fa",
      "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",
  "profile_image": "",
  "settings": {
    "caller_id_name": "FAX.PLUS",
    "send_fax": {
      "options": {},
      "retry": {
        "count": 0,
        "delay": 0
      },
      "should_enhance": true
    }
  },
  "status": "active",
  "uid": "7724157c0974440293e45877c57f0703"
}

User account model

Properties

Name Type Required Description Restrictions
account_data AccountData none none
account_type AccountType * Account type which could be corporate_admin, individual, etc none
creation_date string * Creation date in UTC. Format: YYYY-MM-DD HH:mm:ss Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
email string * Account email address Pattern: ^[a-zA-Z0-9_.+-][email protected][a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$
last_password_modification_date string The date in which you have changed your password none
lastname string Your last name Pattern: ^[^<>{}%[email protected]#$^&*]*$
member_of [string] List of user ids that you are member of. none
name string Your first name Pattern: ^[^<>{}%[email protected]#$^&*]+$
notifications AccountNotifications Account notification settings none
phone string Your account phone number Pattern: ^[+]?[0-9]{8,}$
profile_image string Profile image path none
settings AccountSettings Account settings none
status AccountStatus * Your account status which could be active, inactive etc none
uid string * User ID of current user none

AccountData

{
  "company_logo": "string",
  "company_name": "string",
  "deactivation_reason": "string",
  "default_file_type": "tiff",
  "role": "string",
  "save_history": true
}

Properties

Name Type Required Description Restrictions
company_logo string File name of your company logo none
company_name string Your company name in case you are corporate admin none
deactivation_reason string none none
default_file_type FileType File type none
role string Role of the account in the company none
save_history boolean Save fax CDRs in inbox status none

AccountSettings

{
  "caller_id_name": "string",
  "options": {},
  "send_fax": {
    "retry": {
      "retry": {
        "count": 2,
        "delay": 10
      }
    }
  },
  "should_enhance": true
}

Account settings

Properties

Name Type Required Description Restrictions
caller_id_name string Account caller id name none
options object none none
send_fax object none none
» retry RetryOptions Fax retry settings none
should_enhance boolean none none

AccountList

{
  "members": [
    {
      "account_data": {
        "company_name": "Company name",
        "default_file_type": "pdf",
        "save_history": true
      },
      "account_type": "corporate_admin",
      "creation_date": "2017-05-06 05:22:21",
      "email": "[email protected]",
      "last_password_modification_date": "2017-05-06 05:22:21",
      "lastname": "Smith",
      "member_of": {},
      "notifications": {
        "black_list": {
          "uids": []
        },
        "settings": {
          "email": {
            "addresses": [
              "[email protected]"
            ],
            "low_credit": true,
            "new_feature": true,
            "receive_fax": true,
            "send_fax": true,
            "voicemail": true
          },
          "language": "fa",
          "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",
      "profile_image": "",
      "settings": {
        "caller_id_name": "FAX.PLUS",
        "send_fax": {
          "options": {},
          "retry": {
            "count": 0,
            "delay": 0
          },
          "should_enhance": true
        }
      },
      "status": "active",
      "uid": "7724157c0974440293e45877c57f0703"
    }
  ]
}

List of user accounts

Properties

Name Type Required Description Restrictions
members [Account] * [User account model] none

AccountNotifications

{
  "black_list": {
    "uids": [
      "string"
    ]
  },
  "settings": {
    "email": {
      "addresses": [
        "string"
      ],
      "attachments": {
        "confirmation_page": true,
        "receive_fax": true,
        "send_fax": true
      },
      "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
    },
    "slack": {
      "receive_fax": "with_attachment",
      "send_fax": "with_attachment",
      "target_channel": "string"
    },
    "sms": {
      "low_credit": true,
      "new_feature": true,
      "numbers": [
        "string"
      ],
      "receive_fax": true,
      "send_fax": true,
      "voicemail": true
    }
  }
}

Account notification settings

Properties

Name Type Required Description Restrictions
black_list AccountNotificationsBlacklist none none
settings AccountNotificationsSettings * Account notification settings none

AccountNotificationsBlacklist

{
  "uids": [
    "string"
  ]
}

Properties

Name Type Required Description Restrictions
uids [string] * none none

AccountNotificationsEmailSettings

{
  "addresses": [
    "string"
  ],
  "attachments": {
    "confirmation_page": true,
    "receive_fax": true,
    "send_fax": true
  },
  "low_credit": true,
  "new_feature": true,
  "receive_fax": true,
  "send_fax": true,
  "voicemail": true
}

Email notification settings

Properties

Name Type Required Description Restrictions
addresses [string] List of email addresses to send notifications to none
attachments object Email attachments settings none
» confirmation_page boolean none none
» receive_fax boolean * Set to true if you want to receive new faxes as notification attachments none
» send_fax boolean * Set to true if you want to receive your sent fax as an attachment to the notification none
low_credit boolean * Set to true if you want to receive notifications when your balance is low none
new_feature boolean * Set to true if you want to receive notifications about our new features none
receive_fax boolean * Set to true if you want to receive notifications about receiving faxes none
send_fax boolean * Set to true if you want to receive notifications when your fax is being send none
voicemail boolean * Set to true if you want to receive new voicemail notifications none

AccountNotificationsLanguage

Notifications language

Enum values

AccountNotificationsPushSettings

{
  "low_credit": true,
  "new_feature": true,
  "receive_fax": true,
  "send_fax": true,
  "voicemail": true
}

Push notification settings

Properties

Name Type Required Description Restrictions
low_credit boolean * Set to true if you want to receive notifications when your balance is low none
new_feature boolean * Set to true if you want to receive notifications about our new features none
receive_fax boolean * Set to true if you want to receive notifications about receiving faxes none
send_fax boolean * Set to true if you want to receive notifications when your fax is being send none
voicemail boolean * Set to true if you want to receive new voicemail notifications none

AccountNotificationsSettings

{
  "email": {
    "addresses": [
      "string"
    ],
    "attachments": {
      "confirmation_page": true,
      "receive_fax": true,
      "send_fax": true
    },
    "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
  },
  "slack": {
    "receive_fax": "with_attachment",
    "send_fax": "with_attachment",
    "target_channel": "string"
  },
  "sms": {
    "low_credit": true,
    "new_feature": true,
    "numbers": [
      "string"
    ],
    "receive_fax": true,
    "send_fax": true,
    "voicemail": true
  }
}

Account notification settings

Properties

Name Type Required Description Restrictions
email AccountNotificationsEmailSettings * Email notification settings none
language AccountNotificationsLanguage Notifications language none
push_notifications AccountNotificationsPushSettings * Push notification settings none
slack AccountNotificationsSlackSettings Slack notification settings none
sms AccountNotificationsSmsSettings * SMS notification settings none

AccountNotificationsSlackSettings

{
  "receive_fax": "with_attachment",
  "send_fax": "with_attachment",
  "target_channel": "string"
}

Slack notification settings

Properties

Name Type Required Description Restrictions
receive_fax SlackNotificationMode * none none
send_fax SlackNotificationMode * none none
target_channel string * Channel to send notifications none

AccountNotificationsSmsSettings

{
  "low_credit": true,
  "new_feature": true,
  "numbers": [
    "string"
  ],
  "receive_fax": true,
  "send_fax": true,
  "voicemail": true
}

SMS notification settings

Properties

Name Type Required Description Restrictions
low_credit boolean * Set to true if you want to receive notifications when your balance is low none
new_feature boolean * Set to true if you want to receive notifications about our new features none
numbers [string] List of phone numbers to send SMS notifications to none
receive_fax boolean * Set to true if you want to receive notifications about receiving faxes none
send_fax boolean * Set to true if you want to receive notifications when your fax is being send none
voicemail boolean * Set to true if you want to receive new voicemail notifications none

AccountStatus

Your account status which could be active, inactive etc

Enum values

AccountType

Account type which could be corporate_admin, individual, etc

Enum values

Binary

Binary data. Will save to file and return file path if _preload_content is True, otherwise will return binary stream

Error

{
  "description": "string",
  "error": "string"
}

Properties

Name Type Required Description Restrictions
description string none none
error string none none

Fax

{
  "comment": "",
  "cost": 2,
  "cost_details": {
    "multiplier": 1,
    "notification_cost": 0
  },
  "description": "OK",
  "direction": "incoming",
  "duration": 0,
  "file": "ec28edc283a74daca1787efb5fa6fae2.tiff",
  "file_name": "fax-from-12076001783",
  "from_number": "+12076001783",
  "header": null,
  "id": "5e7de3ad54cfd54eb568cc76",
  "is_read": false,
  "is_spam": false,
  "last_update": "2020-03-27 11:29:49",
  "max_retry": null,
  "owner_id": "74d59d2779fb42a99cd5bb993c0c89d2",
  "pages": 2,
  "retry_delay": null,
  "scheduled_time": null,
  "start_time": "2020-03-27 11:29:21",
  "status": "failed",
  "submit_time": null,
  "to": "+12076001783"
}

Properties

Name Type Required Description Restrictions
comment string * Free-form comment none
cost integer Fax cost in the user currency none
cost_details object * none none
» multiplier number none none
» notification_cost number none none
description string none none
direction FaxDirection Fax direction none
duration integer none none
file string none none
file_name string File name none
from string Sender number. Might be a userId for faxes sent or received with free accounts none
header string none none
id string * Fax ID none
is_read boolean none none
is_spam boolean True if the fax is marked as spam none
last_update string none none
max_retry integer Maximum number of retries none
owner_id string * User ID of the fax owner none
pages integer * Number of pages in the fax none
retry_delay integer Delay between two retries none
scheduled_time string none none
start_time string none none
status FaxStatus * Fax status none
submit_time string Time when the fax was submitted for sending. For outgoing faxes only none
to string Fax destination number. Might be a userId for faxes sent or received with free accounts none

FaxCategory

Enum values

FaxDirection

Fax direction

Enum values

FaxList

{
  "data": {
    "records": [
      {
        "comment": "",
        "cost": 2,
        "cost_details": {
          "multiplier": 1,
          "notification_cost": 0
        },
        "description": "OK",
        "direction": "incoming",
        "duration": 0,
        "file": "ec28edc283a74daca1787efb5fa6fae2.tiff",
        "file_name": "fax-from-12076001783",
        "from_number": "+12076001783",
        "header": null,
        "id": "5e7de3ad54cfd54eb568cc76",
        "is_read": false,
        "is_spam": false,
        "last_update": "2020-03-27 11:29:49",
        "max_retry": null,
        "owner_id": "74d59d2779fb42a99cd5bb993c0c89d2",
        "pages": 2,
        "retry_delay": null,
        "scheduled_time": null,
        "start_time": "2020-03-27 11:29:21",
        "status": "failed",
        "submit_time": null,
        "to": "+12076001783"
      }
    ]
  }
}

List of fax data

Properties

Name Type Required Description Restrictions
data FaxListData none none

FaxListData

{
  "records": [
    {
      "comment": "",
      "cost": 2,
      "cost_details": {
        "multiplier": 1,
        "notification_cost": 0
      },
      "description": "OK",
      "direction": "incoming",
      "duration": 0,
      "file": "ec28edc283a74daca1787efb5fa6fae2.tiff",
      "file_name": "fax-from-12076001783",
      "from_number": "+12076001783",
      "header": null,
      "id": "5e7de3ad54cfd54eb568cc76",
      "is_read": false,
      "is_spam": false,
      "last_update": "2020-03-27 11:29:49",
      "max_retry": null,
      "owner_id": "74d59d2779fb42a99cd5bb993c0c89d2",
      "pages": 2,
      "retry_delay": null,
      "scheduled_time": null,
      "start_time": "2020-03-27 11:29:21",
      "status": "failed",
      "submit_time": null,
      "to": "+12076001783"
    }
  ]
}

Properties

Name Type Required Description Restrictions
records [Fax] none none

FaxStatus

Fax status

Enum values

File

{
  "fax_file": "string"
}

File to be uploaded

Properties

Name Type Required Description Restrictions
fax_file string(binary) * Path to file to upload none

FilePath

{
  "path": "/storage/2937237320213-213-21323"
}

File path object

Properties

Name Type Required Description Restrictions
path string * Path of newly uploaded file none

FileType

File type

Enum values

MemberDetail

{
  "quota": 400,
  "role": "Sales Manager"
}

Company member details

Properties

Name Type Required Description Restrictions
quota integer Quota of member (number of pages member can send per month) none
role string Role of member in your company none

Number

{
  "acquired_date": "2017-07-31 09:20:06",
  "assigned_to": [
    "7724157c0974440293e45877c57f0703"
  ],
  "expiration_date": null,
  "id": "e6e68ef87f0b8768ebacdb218994bfe7",
  "is_canceled": false,
  "notifications": [
    {
      "email": true,
      "push_notification": true,
      "type": "voicemail"
    },
    {
      "email": true,
      "push_notification": true,
      "type": "receive_fax"
    },
    {
      "email": true,
      "push_notification": true,
      "type": "announcement"
    },
    {
      "email": true,
      "push_notification": true,
      "type": "callforward"
    }
  ],
  "number": "+16699990000",
  "owner_id": "7724157c0974440293e45877c57f0703",
  "status": "active"
}

Properties

Name Type Required Description Restrictions
acquired_date string * Date and time at which the number was acquired none
assigned_to [string] * IDs of the user to whom this number is assigned none
expiration_date string Number expiration date, might be blank none
id string * Number ID none
is_canceled boolean True if number is canceled but not yet deleted none
notifications [any] none none
» email boolean none none
» push_notification boolean none none
» type string none none
number string * Phone number Pattern: ^[+][0-9]{8,}$
owner_id string * User ID of the number's owner none
status NumberStatus * Status of your fax phone number e.g. active, inactive. none

NumberStatus

Status of your fax phone number e.g. active, inactive.

Enum values

NumberList

{
  "numbers": [
    {
      "acquired_date": "2017-07-31 09:20:06",
      "assigned_to": [
        "7724157c0974440293e45877c57f0703"
      ],
      "expiration_date": null,
      "id": "e6e68ef87f0b8768ebacdb218994bfe7",
      "is_canceled": false,
      "notifications": [
        {
          "email": true,
          "push_notification": true,
          "type": "voicemail"
        },
        {
          "email": true,
          "push_notification": true,
          "type": "receive_fax"
        },
        {
          "email": true,
          "push_notification": true,
          "type": "announcement"
        },
        {
          "email": true,
          "push_notification": true,
          "type": "callforward"
        }
      ],
      "number": "+16699990000",
      "owner_id": "7724157c0974440293e45877c57f0703",
      "status": "active"
    }
  ]
}

List of numbers

Properties

Name Type Required Description Restrictions
numbers [Number] * none none

Outbox

{
  "comment": {
    "tags": [],
    "text": ""
  },
  "contact_name": "",
  "designated_src": "",
  "extra_info": {},
  "file_changes": [],
  "files": [
    "/transient-29362c0c-eeff-45c1-9f4e-4ef5865a41df"
  ],
  "id": "13a4afb0585345639733857e8f36df8d",
  "initiated_from": {
    "from_id": "",
    "type": ""
  },
  "ip": "8.8.8.8",
  "last_updated_status_time": "2017-09-24 06:43:04",
  "options": {},
  "page_count": 0,
  "retry": {
    "count": 0,
    "delay": 0
  },
  "send_time": "2017-09-24 06:43:04 +0000",
  "should_enhance": false,
  "src": "+16699990000",
  "status": "submitted",
  "status_changes": [
    {
      "at": "2017-09-24 06:43:04",
      "status": "submitted"
    }
  ],
  "submit_time": "2017-09-24 06:43:04 +0000",
  "to": [
    "+16699990000"
  ],
  "uid": "53a1afb8585345a39033857e1f36bf8d"
}

Model for the outbound fax stored in the outbox

Properties

Name Type Required Description Restrictions
comment object Comment and tags to mark the fax none
» tags [string] List of tags to mark the fax none
» text string Free-form text comment none
contact_name string none none
designated_src string none none
extra_info object none none
file_changes [any] none none
» at string none none
» files [any] none none
»» file_name string none none
»» mime_type string none none
»» size number none none
files [string] Files to send none
id string * Fax ID none
initiated_from object none none
» from_id string none none
» type string none none
ip string IP address from which the send request originated none
last_updated_status_time string Time and date when the send request status was last updated. Format: YYYY-MM-DD HH:mm:ss Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}
options object none none
page_count integer Number of fax pages none
retry RetryOptions Fax retry settings none
send_time string none none
should_enhance boolean none none
src string none none
status OutboxStatus * Outbound fax status none
status_changes [any] none none
» at string * Date and time at which status changed. Format: YYYY-MM-DD HH:mm:ss none
» status OutboxStatus * Outbound fax status none
submit_time string Date and time when the fax was submitted for sending none
to [string] none none
uid string * User ID none

OutboxStatus

Outbound fax status

Enum values

OutboxList

{
  "records": [
    {
      "comment": {
        "tags": [],
        "text": ""
      },
      "contact_name": "",
      "designated_src": "",
      "extra_info": {},
      "file_changes": [],
      "files": [
        "/transient-29362c0c-eeff-45c1-9f4e-4ef5865a41df"
      ],
      "id": "13a4afb0585345639733857e8f36df8d",
      "initiated_from": {
        "from_id": "",
        "type": ""
      },
      "ip": "8.8.8.8",
      "last_updated_status_time": "2017-09-24 06:43:04",
      "options": {},
      "page_count": 0,
      "retry": {
        "count": 0,
        "delay": 0
      },
      "send_time": "2017-09-24 06:43:04 +0000",
      "should_enhance": false,
      "src": "+16699990000",
      "status": "submitted",
      "status_changes": [
        {
          "at": "2017-09-24 06:43:04",
          "status": "submitted"
        }
      ],
      "submit_time": "2017-09-24 06:43:04 +0000",
      "to": [
        "+16699990000"
      ],
      "uid": "53a1afb8585345a39033857e1f36bf8d"
    }
  ]
}

List of the outgoing faxes

Properties

Name Type Required Description Restrictions
records [Outbox] * [Model for the outbound fax stored in the outbox] none

PayloadAccountModification

{
  "account_data": {
    "company_name": "Company name",
    "default_file_type": "pdf",
    "save_history": true
  },
  "account_type": "corporate_admin",
  "creation_date": "2017-05-06 05:22:21",
  "email": "[email protected]",
  "last_password_modification_date": "2017-05-06 05:22:21",
  "lastname": "Smith",
  "member_of": {},
  "notifications": {
    "black_list": {
      "uids": []
    },
    "settings": {
      "email": {
        "addresses": [
          "[email protected]"
        ],
        "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",
  "profile_image": "",
  "settings": {
    "caller_id_name": "FAX.PLUS",
    "send_fax": {
      "options": {},
      "retry": {
        "count": 0,
        "delay": 0
      },
      "should_enhance": true
    }
  },
  "status": "active",
  "uid": "7724157c0974440293e45877c57f0703"
}

Model for updating user account

Properties

Name Type Required Description Restrictions
account_data AccountData none none
email string Account email address Pattern: ^[a-zA-Z0-9_.+-][email protected][a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$
lastname string Your last name Pattern: ^[^<>{}%[email protected]#$^&*]*$
name string Your first name Pattern: ^[^<>{}%[email protected]#$^&*]+$
notifications AccountNotifications Account notification settings none
phone string Your account phone number Pattern: ^[+]?[0-9]{8,}$
profile_image string Profile image path none
settings AccountSettings Account settings none

PayloadFaxModification

{
  "comment": "string",
  "is_read": true
}

Properties

Name Type Required Description Restrictions
comment string * none none
is_read boolean * none none

PayloadNumberModification

{
  "assigned_to": "string"
}

Number update model

Properties

Name Type Required Description Restrictions
assigned_to string * User ID of the account to assign number to none

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",
  "to": [
    "+12345688",
    "+12345699"
  ]
}

Model for creating new outbound fax

Properties

Name Type Required Description Restrictions
from string * Number to use for sending the fax Pattern: ^[+][0-9]{8,}([*]{0,10}[0-9]+)?$
to [string] * List of fax destination numbers none
files [string] * List of file names to send. Files should be uploaded beforehand. none
comment object none none
» tags [string] none none
» text string none none
options object none none
» enhancement boolean none none
» retry RetryOptions Fax retry settings none
send_time string Date when to send the fax. Format: YYYY-MM-DD HH:mm:ss +HHMM Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [+][0-9]{4}

PayloadOutboxModification

{
  "comment": "string"
}

Model for updating the outgoing fax

Properties

Name Type Required Description Restrictions
comment string New comment text none

RetryOptions

{
  "retry": {
    "count": 2,
    "delay": 10
  }
}

Fax retry settings

Properties

Name Type Required Description Restrictions
count integer Number of tries to send the fax none
delay integer Delay in seconds between two retries none

SlackNotificationMode

Enum values