Logo
cURL Ruby PHP Python Node.js

Introduction

Getting Started

API Endpoint https://api.documo.com

The Documo API is organized around REST. All calls to the Documo API should be made to https://api.documo.com. All responses are formatted in JSON. This is a required parameter. This is an optional parameter.

You can view code examples in the dark area to the right. You can switch the programming language of the examples using the tabs above.

Enabling API access

To begin using the Documo API, you will need to enable the API and generate an API key. This can be done in by logging into the web app and visiting Settings > API. Visual instructions here.

Authentication

Example of request with API key:

curl -X {{method}}
'https://api.documo.com/{{path}}' \
-H 'Authorization: Basic {{API_KEY}}'
import requests

headers = {
    'Authorization': 'Basic {{API_KEY}}',
}

requests.{{method}}('https://api.documo.com/{{path}}', headers=headers)
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/{{path}}")
request = Net::HTTP::{{method}}.new(uri)
request["Authorization"] = "Basic {{API_KEY}}"

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
<?php
$request = new HttpRequest();
$request->setUrl('https://api.documo.com/{{path}}');
$request->setMethod(HTTP_METH_{{method}});

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
const request = require("request");

request({
    method: '{{method}}',
    url: 'https://api.documo.com/{{path}}',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Parameter Value
name Authorization
in header
token Basic {{API_KEY}}

Most calls will require authentication. Documo supports HTTP authentication. You will need to pass through your secret API key (example shown).

Security note: All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

View my user

Request:

curl -X GET 
'https://api.documo.com/v1/me' \
-H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/me"

headers = {
    'Authorization': "Basic {{API_KEY}}",
    }

requests.get(url, headers=headers)
<?php
$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/me');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/me")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/me',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "settings": {
    "emailNotifySendOption": "All",
    "emailNotifyReceiveOption": "All",
    "emailNotifySendIncAttachment": true,
    "emailNotifyReceiveIncAttachment": true,
    "emailToFaxCoverPageOption": false
  },
  "userId": "7427d2e5-fa42-4820-b612-b7a3132efe30",
  "accountId": "ad39a2c2-d154-4170-83e4-a75fa5466d33",
  "email": "example@mail.com",
  "firstName": "displayName",
  "lastName": null,
  "userRole": "admin",
  "isActive": true,
  "companyName": "Company Name",
  "phone": "123456789",
  "faxCsid": "mFax",
  "faxCallerId": "12021234567",
  "lastLoginIp": "127.0.0.1",
  "lastLoginDate": "2017-06-26T11:22:20.000Z",
  "isEmailConfirmed": true,
  "apiKey": "{{{API_KEY}}}",
  "createdAt": "2017-06-26T10:23:50.000Z",
  "account": {
    "settings": {
      "emailNotifySendOption": "Failure",
      "emailNotifyReceiveOption": "Failure",
      "emailNotifySendIncAttachment": "true",
      "emailNotifyReceiveIncAttachment": "true",
      "timezone": "America/Los_Angeles",
      "emailToFax": "false",
      "storeFaxesTime": "14400",
      "allowFaxAttachments": "true",
      "usersTokenLife": "14400"
    },
    "uuid": "ad39a2c2-d154-4170-83e4-a75fa5466d33",
    "supportCode": "2201752731",
    "companyName": "Documo",
    "isReseller": false,
    "isActive": true,
    "defaultPaymentMethodId": null,
    "parentId": null,
    "faxCsid": "mFax",
    "faxCallerId": "12021234567",
    "nextBillingPlanCode": null
  },
  "faxNumbers": []
}

Method: GET

Path: /v1/me

Returns your detailed user data.

Fax

Send a fax

Request:

curl -X POST
  'https://api.documo.com/v1/fax/send' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'content-type: multipart/form-data' \
  -F 'recipientFax=12345678900' \
  -F 'coverPage=false' \
  -F 'recipientName=John' \
  -F 'subject=test' \
  -F 'notes=test' \
  -F 'tags=b0514cef-92c4-43e1-8c7e-061ee72b0de1'\
  -F 'file[]=/home/user/Documents/Sample.pdf'
import requests

url = "https://api.documo.com/v1/fax/send"

headers = {
    'Authorization': 'Basic {{API_KEY}}',
    'Content-Type': 'multipart/form-data',
}

data = [
  ('recipientFax', '12345678900'),
  ('coverPage', 'false'),
  ('recipientName', 'John'),
  ('subject', 'test'),
  ('notes', 'test'),
  ('tags', 'b0514cef-92c4-43e1-8c7e-061ee72b0de1'),
]

files = [
    ('file', open('/home/user/Documents/Sample.pdf', 'rb')),
]

requests.post(url, headers=headers, data=data, files=files)
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/fax/send")
request = Net::HTTP::Post.new(uri)
request.content_type = "multipart/form-data"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "recipientFax" => "12345678900",
  "coverPage" => "false",
  "recipientName" => "John",
  "subject" => "test",
  "notes" => "test",
  "tags" => "b0514cef-92c4-43e1-8c7e-061ee72b0de1",
  "file" => "/home/user/Documents/Sample.pdf",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
<?php
$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->addForm(array(
  'recipientFax' => '12345678900',
  'recipientName' => 'John',
  'subject' => 'test',
  'notes' => 'test'
  'tags' => 'b0514cef-92c4-43e1-8c7e-061ee72b0de1'
), array(
  array(
    'name' => '',
    'type' => null,
    'file' => '/home/vlad/Downloads/Sample.pdf',
    'data' => null
  )
));

$request->setRequestUrl('https://api.documo.com/v1/fax/send');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
const fs = require("fs");
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/fax/send',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        'content-type': 'multipart/form-data'
    },
    formData: {
        recipientFax: '12345678900',
        coverPage: false,
        recipientName: 'John',
        subject: 'test',
        notes: 'test',
        tags: 'b0514cef-92c4-43e1-8c7e-061ee72b0de1',
        files: {
            value: fs.createReadStream("/home/user/Documents/Sample.pdf"),
            options: {
                filename: '/home/user/Documents/Sample.pdf',
                contentType: 'application/pdf'
            }
        }
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
    "success": [
        {
            "accountId":"00000000-0000-0000-0000-000000000000",
            "channelType":"web",
            "classificationLabel":"outbound",
            "createdAt":"2018-01-01T12:00:00.000Z",
            "deletedAt":null,
            "deliveryId":"2180614133420933276",
            "duration":86318,
            "errorCode":"0",
            "errorInfo":"",
            "faxAttempt":1,
            "faxbridge":null,
            "faxbridgeId":null,
            "faxCallerId":"5094570051",
            "faxCsid":"mFax",
            "faxDetected":true,
            "faxECM":256,
            "faxNumber":"+18885550000",
            "faxProtocol":34,
            "faxSpeed":33600,
            "isArchived":false,
            "isFilePurged":false,
            "isRead":false,
            "messageId":"00000000-0000-0000-0000-000000000000",
            "messageNumber":"8900000",
            "pagesComplete":3,
            "pagesCount":3,
            "processingStatusName":"success",
            "resolvedDate":"2018-01-01T12:00:00.000Z",
            "resultCode":"0",
            "contacts":[]
            "tags":[],
            "users":[],
        }
    ],
    "errors": [
      // Error message example
      {
        "error" : "InvalidInputError: No files and cover page in to send.",
        "recipientFax" : "12015234232"
      }
    ]
}

Method: POST

Path: /v1/fax/send

Use this method to create and send a fax. You may include our default cover page by adding coverPage parameter with a value of true. Files added to the stream will be converted to the body of the fax in the order they are added.

Multiple recipients: You may add multiple comma separated recipient destinations. This will result in an identical fax being sent to each destination.

Parameters

Name Type In Description
recipientFax string formData Destination phone number. Country code must be included (ex. 18885551234). Multiple destinations separated by comma.
recipientContacts string formData Contact IDs separated by comma
file blob formData File(s) you wish to fax. Add files to the stream in order they should be rendered. At least 1 file is required if coverPage parameter is not added.
coverPage boolean formData Defaults to false. Indicating true will include system cover page. If coverPage is added, this removes file requirement.
recipientName string formData Will populate in TO field of cover page
subject string formData Will populate Subject field of cover page
callerId string formData Phone number. Defaults to user setting if not included in call.
notes string formData Will populate Notes field of cover page
tags string formData Comma separated tag IDs list

Resend fax

curl -X POST 'https://api.documo.com/v1/fax/' \
 -H 'Authorization: Basic {{API_KEY}}' \
 -H 'Content-type: application/x-www-form-urlencoded' \
 -d' messageId=00000000-0000-0000-0000-000000000000&recipientFax=12345678900'
import requests

url = "https://api.documo.com/v1/fax/"

headers = {
    'Authorization': 'Basic {{API_KEY}}',
    'Content-type': 'application/x-www-form-urlencoded',
}

data = [
  ('messageId', '00000000-0000-0000-0000-000000000000'),
  ('recipientFax', '12345678900'),
]

requests.post(url, headers=headers, data=data)
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/fax/")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "messageId" => "00000000-0000-0000-0000-000000000000",
  "recipientFax" => "12345678900",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->addForm(array(
  'messageId' => '00000000-0000-0000-0000-000000000000',
  'recipientFax' => '12345678900'
), NULL);

$request->setRequestUrl('https://api.documo.com/v1/fax/');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/fax/',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        'content-type': 'application/x-www-form-urlencoded'
    },
    formData: {
        messageId: '00000000-0000-0000-0000-000000000000',
        recipientFax: '12345678900'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
      "accountId":"00000000-0000-0000-0000-000000000000",
      "channelType":"web",
      "classificationLabel":"outbound",
      "createdAt":"2018-01-01T12:00:00.000Z",
      "deletedAt":null,
      "deliveryId":"2180614133420933276",
      "duration":86318,
      "errorCode":"0",
      "errorInfo":"",
      "faxAttempt":1,
      "faxbridgeId":210000000000,
      "faxCallerId":"5094570051",
      "faxCsid":"mFax",
      "faxDetected":true,
      "faxECM":256,
      "faxNumber":"+18885550000",
      "faxProtocol":34,
      "faxSpeed":33600,
      "isArchived":false,
      "isFilePurged":false,
      "isRead":false,
      "messageId":"00000000-0000-0000-0000-000000000000",
      "messageNumber":"8900000",
      "pagesComplete":3,
      "pagesCount":3,
      "processingStatusName":"success",
      "resolvedDate":"2018-01-01T12:00:00.000Z",
      "resultCode":"0",
      "contacts":[]
      "tags":[],
      "users":[],
      "faxbridge": {
        "deviceCode": "210000000000",
        "name": "FaxBridge",
        "isActive": true
      },
}

Method: POST

Path: /v1/fax/resend

This call will resend a previously attempted fax. Simply supply the messageId of previous fax and we will resend.

Parameters

Name Type In Description
messageId string formData Unique message identifier provided by Documo
recipientFax string formData Use this parameter to change destination phone number.

Fax download

Request:

curl -X GET 
'https://api.documo.com/v1/fax/download?messageId=00000000-0000-0000-0000-000000000000' \
-H 'Accept: application/json' \
-H 'Authorization: Basic {{API_KEY}}' 
import requests

url = "https://api.documo.com/v1/fax/download"

headers = {
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
}

params = (
    ('messageId', '00000000-0000-0000-0000-000000000000'),
)

requests.get(url, headers=headers, params=params)
<?php
$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/fax/download');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'messageId' => '00000000-0000-0000-0000-000000000000'
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/fax/download?messageId=00000000-0000-0000-0000-000000000000")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/fax/download',
    qs: {
        messageId: '00000000-0000-0000-0000-000000000000'
    },
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

Content-Disposition: attachment; filename="Sample.pdf"
Content-Length: 53248
Content-Type: application/pdf

Method: GET

Path: /v1/fax/download

Method will return PDF download of requested fax.

Parameters

Name Type In Description
messageId string formData Unique message identifier provided by Documo
extension string formData File extension. Default is pdf, tiff is also available

Fax history

Request:

curl -X GET 
'https://api.documo.com/v1/fax/history?offset=0&limit=20&direction=all&status=all' \
-H 'Accept: application/json' \
-H 'Authorization: Basic {{API_KEY}}' 
import requests

url = "https://api.documo.com/v1/fax/history"

headers = {
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
}

params = (
    ('offset', '0'),
    ('limit', '20'),
    ('direction', 'all'),
    ('status', 'all')
    ('query', '')
)

requests.get(url, headers=headers, params=params)
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/fax/history")
request = Net::HTTP::Get.new(uri)
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "offset" => "0",
  "limit" => "20",
  "direction" => "all",
  "status" => "all",
  "query" => ""
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/fax/history');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'offset' => '0',
  'limit' => '20',
  'direction' => 'all',
  'status' => 'all'
  'query' => ''

));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

echo $response->getBody();
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/fax/history',
    qs: {
        offset: '0',
        limit: '20',
        direction: 'all',
        status: 'all',
        query: '',
    },
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "count": 42,
  "rows": [
    {
      "accountId":"00000000-0000-0000-0000-000000000000",
      "channelType":"web",
      "classificationLabel":"outbound",
      "createdAt":"2018-01-01T12:00:00.000Z",
      "deletedAt":null,
      "deliveryId":"2180614133420933276",
      "duration":86318,
      "errorCode":"0",
      "errorInfo":"",
      "faxAttempt":1,
      "faxbridge":null,
      "faxbridgeId":null,
      "faxCallerId":"5094570051",
      "faxCsid":"mFax",
      "faxDetected":true,
      "faxECM":256,
      "faxNumber":"+18885550000",
      "faxProtocol":34,
      "faxSpeed":33600,
      "isArchived":false,
      "isFilePurged":false,
      "isRead":false,
      "messageId":"00000000-0000-0000-0000-000000000000",
      "messageNumber":"8900000",
      "pagesComplete":3,
      "pagesCount":3,
      "processingStatusName":"success",
      "resolvedDate":"2018-01-01T12:00:00.000Z",
      "resultCode":"0",
      "contacts":[]
      "tags":[],
      "users":[],
    },
    ...
  ],
  "limit": 0,
  "offset": 20
}

Method: GET

Path: /v1/fax/history

Returns detailed fax history as line items. Response is paged.

Parameters

Name Type In Description
offset integer query Number of pages to return
limit integer query Amount of line items per page that will be returned
direction string query Filters results by direction. Can indicate all (default), inbound or outbound
status string query Filters results by status. Can indicate all (default), failed, success, or processing
fromDate date query Filters results from starting date. (ex. 2012-04-23T18:25:43.511Z)
toDate date query Filters results up to end date. (ex. 2012-04-23T18:25:43.511Z)
userId string query Filters results by User ID
accountId string query Filters results by Account ID
query string query Search by CSID, Caller ID, fax number and message id.
tags string query Filters by comma separated tags list
archived boolean query Filters by archived faxes if true
includes string query Include assigned contacts or tags. Example: tags,contacts

Fax info

Request:

curl -X GET
  'https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000/info' \
  -H 'Authorization: Basic {{API_KEY}}'
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000/info');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000/info")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000/info"

headers = {
    'Authorization': 'Basic {{API_KEY}}'
}

requests.get(url, headers=headers)
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000/info',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "accountId":"00000000-0000-0000-0000-000000000000",
  "channelType":"web",
  "classificationLabel":"outbound",
  "createdAt":"2018-01-01T12:00:00.000Z",
  "deletedAt":null,
  "deliveryId":"2180614133420933276",
  "duration":86318,
  "errorCode":"0",
  "errorInfo":"",
  "faxAttempt":1,
  "faxbridge":null,
  "faxbridgeId":null,
  "faxCallerId":"5094570051",
  "faxCsid":"mFax",
  "faxDetected":true,
  "faxECM":256,
  "faxNumber":"+18885550000",
  "faxProtocol":34,
  "faxSpeed":33600,
  "isArchived":false,
  "isFilePurged":false,
  "isRead":false,
  "messageId":"00000000-0000-0000-0000-000000000000",
  "messageNumber":"8900000",
  "pagesComplete":3,
  "pagesCount":3,
  "processingStatusName":"success",
  "resolvedDate":"2018-01-01T12:00:00.000Z",
  "resultCode":"0",
  "contacts":[]
  "tags":[],
  "faxbridge": {
    "deviceCode": "210000000000",
    "name": "FaxBridge",
    "isActive": true
  },
  "users": [
    {
      "userId": "00000000-0000-0000-0000-000000000000",
      "firstName": "John",
      "lastName": "Snow",
      "email": "john@snow.com"
    }
  ],
  "account": {
    "uuid": "00000000-0000-0000-0000-000000000000",
    "supportCode": "1201800000",
    "companyName": "Winterfell"
  }
}

Method: GET

Path: /v1/fax/{messageId}/info

Returns fax info.

Parameters

Name Type In Description
messageId string path Unique message identifier provided by Documo

Fax delete

Request:

curl -X DELETE
  'https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000' \
  -H 'Authorization: Basic {{API_KEY}}'
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
import requests

url = "https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000"

headers = {
    'Authorization': 'Basic {{API_KEY}}'
}

requests.delete(url, headers=headers)
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/fax/00000000-0000-0000-0000-000000000000',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

Status: 200

Method: DELETE

Path: /v1/fax/{messageId}

Removes fax.

Parameters

Name Type In Description
messageId string path Unique message identifier provided by Documo

Contacts

Get contacts

Request:

curl -X GET \
  'https://api.documo.com/v1/contacts?limit=15&offset=0&query=Organization' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/contacts"

querystring = {"limit":"15","offset":"0","query":"Organization"}

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.get(url, headers=headers, params=querystring)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/contacts');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'limit' => '15',
  'offset' => '0',
  'query' => 'Organization'
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/contacts?limit=15&offset=0&query=Organization")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/contacts',
    qs: {
        limit: 15,
        offset: 0,
        order: 'name asc'
    },
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

{
  "count": 1,
  "rows": [
    {
      "uuid": "861660d0-1807-44cb-b68f-c96381a741d6",
      "isOrganization": true,
      "userId": "7b667809-c88f-4a27-b1fe-2cc932401e15",
      "name": "Organization",
      "phoneNumber": "",
      "faxNumber": "",
      "email": "org@com",
      "isPublic": false,
      "publicEditable": false,
      "organizationId": null,
      "contacts": [
        {
          "uuid": "1df1aa6d-0e5e-4a77-8dde-de601e902608",
          "isOrganization": false,
          "userId": "7b667809-c88f-4a27-b1fe-2cc932401e15",
          "name": "Person",
          "phoneNumber": "",
          "faxNumber": "",
          "email": "person@org",
          "isPublic": false,
          "publicEditable": false,
          "organizationId": "861660d0-1807-44cb-b68f-c96381a741d6"
        }
      ]
    }
  ],
  "limit": 15,
  "offset": 0
}

Method: GET

Path: /v1/contacts

Get contacts list by User ID

Parameters

Name Type In Description
userId string query User ID. If not specified - returns results for current user
offset integer query Number of pages to return
limit integer query Amount of line items per page that will be returned
order string query Order results. Ordered by name in ascending order, default value is name asc
query string query Search by contact name, fax number, phone number or email

Create contact

curl -X POST \
  https://api.documo.com/v1/contacts \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'phoneNumber=(201)%20555-0123&faxNumber=(201)%20555-0124&name=John%20Snow&email=john%40snow.com&isPublic=false&publicEditable=false&isOrganization=false'
import requests

headers = {
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
    'Content-Type': 'application/x-www-form-urlencoded',
}

data = [
  ('phoneNumber', '(201) 555-0123'),
  ('faxNumber', '(201) 555-0124'),
  ('name', 'John Snow'),
  ('email', 'john@snow.com'),
  ('isPublic', 'false'),
  ('publicEditable', 'false'),
  ('isOrganization', 'false'),
]

response = requests.post('https://api.documo.com/v1/contacts', headers=headers, data=data)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/contacts');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json',
  'Content-Type' => 'application/x-www-form-urlencoded'
));

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
  'phoneNumber' => '(201) 555-0123',
  'faxNumber' => '(201) 555-0124',
  'name' => 'John Snow',
  'email' => 'john@snow.com',
  'isPublic' => 'false',
  'publicEditable' => 'false',
  'isOrganization' => 'false'
));

$response = $request->send();
echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/contacts")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "email" => "john@snow.com",
  "faxNumber" => "(201) 555-0124",
  "isOrganization" => "false",
  "isPublic" => "false",
  "name" => "John Snow",
  "phoneNumber" => "(201) 555-0123",
  "publicEditable" => "false",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(request)
end
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/contacts',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
        phoneNumber: '(201) 555-0123',
        faxNumber: '(201) 555-0124',
        name: 'John Snow',
        email: 'john@snow.com',
        isPublic: 'false',
        publicEditable: 'false',
        isOrganization: 'false'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

{
  "uuid": "e073d09d-9edd-40b4-ba7a-8a423a52e74a",
  "name": "John Snow",
  "phoneNumber": "(201) 555-0123",
  "faxNumber": "(201) 555-0124",
  "email": "john@snow.com",
  "isPublic": false,
  "publicEditable": false,
  "isOrganization": false,
  "userId": "7b667809-c88f-4a27-b1fe-2cc932401e15"
}

Method: POST

Path: /v1/contacts

Create contact

Parameters

Name Type In Description
userId string query User ID. If not specified - creates contact for current user
name integer formData Contact name
email string formData Contact email
faxNumber integer formData Fax number in format (***) ***-****. Required for sending fax using contact
phoneNumber integer formData Phone number in format (***) ***-****
organizationId string formData Assign contact to existing organization contact
isPublic boolean formData Contact will be shown for all users in the account
isOrganization boolean formData If true - organization will be created
publicEditable boolean formData All account users will be able to edit contact if value is true

Update contact

curl -X PATCH \
  https://api.documo.com/v1/contacts \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'phoneNumber=(201)%20555-0123&faxNumber=(201)%20555-0124&name=John%20Snow&email=john%40snow.com&isPublic=false&publicEditable=false'
import requests

headers = {
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
    'Content-Type': 'application/x-www-form-urlencoded',
}

data = [
  ('phoneNumber', '(201) 555-0123'),
  ('faxNumber', '(201) 555-0124'),
  ('name', 'John Snow'),
  ('email', 'john@snow.com'),
  ('isPublic', 'false'),
  ('publicEditable', 'false'),
]

response = requests.patch('https://api.documo.com/v1/contacts', headers=headers, data=data)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/contacts');
$request->setMethod(HTTP_METH_PATCH);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json',
  'Content-Type' => 'application/x-www-form-urlencoded'
));

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
  'phoneNumber' => '(201) 555-0123',
  'faxNumber' => '(201) 555-0124',
  'name' => 'John Snow',
  'email' => 'john@snow.com',
  'isPublic' => 'false',
  'publicEditable' => 'false',
));

$response = $request->send();
echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/contacts")
request = Net::HTTP::Patch.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "email" => "john@snow.com",
  "faxNumber" => "(201) 555-0124",
  "isPublic" => "false",
  "name" => "John Snow",
  "phoneNumber" => "(201) 555-0123",
  "publicEditable" => "false",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(request)
end
const request = require("request");

request({
    method: 'PATCH',
    url: 'https://api.documo.com/v1/contacts',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
        phoneNumber: '(201) 555-0123',
        faxNumber: '(201) 555-0124',
        name: 'John Snow',
        email: 'john@snow.com',
        isPublic: 'false',
        publicEditable: 'false',
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

{
  "uuid": "e073d09d-9edd-40b4-ba7a-8a423a52e74a",
  "name": "John Snow",
  "phoneNumber": "(201) 555-0123",
  "faxNumber": "(201) 555-0124",
  "email": "john@snow.com",
  "isPublic": false,
  "publicEditable": false,
  "isOrganization": false,
  "userId": "7b667809-c88f-4a27-b1fe-2cc932401e15"
}

Method: PATCH

Path: /v1/contacts/{contactId}

Update contact

Parameters

Name Type In Description
contactId string path Contact ID
name integer formData Contact name
email string formData Contact email
faxNumber integer formData Fax number in format (***) ***-****. Required for sending fax using contact
phoneNumber integer formData Phone number in format (***) ***-****
organizationId string formData Assign contact to existing organization contact
isPublic boolean formData Contact will be shown for all users in the account
publicEditable boolean formData All account users will be able to edit contact if value is true

Delete contact

Request:

curl -X DELETE \
  https://api.documo.com/v1/contacts/e073d09d-9edd-40b4-ba7a-8a423a52e74a \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/contacts/e073d09d-9edd-40b4-ba7a-8a423a52e74a"

headers = {
    'Accept': "application/json",
    'Authorization': "Basic {{API_KEY}}"
    }

response = requests.request("DELETE", url, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/contacts/e073d09d-9edd-40b4-ba7a-8a423a52e74a');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/contacts/e073d09d-9edd-40b4-ba7a-8a423a52e74a")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/contacts/e073d09d-9edd-40b4-ba7a-8a423a52e74a',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

Status: 204

Method: DELETE

Path: /v1/contacts/{contactId}

Delete contact

Parameters

Name Type In Description
contactId string path Contact ID

Bulk delete contacts

Request:

curl -X DELETE \
  'https://api.documo.com/v1/contacts/bulk?contactsIds=861660d0-1807-44cb-b68f-c96381a741d6,1df1aa6d-0e5e-4a77-8dde-de601e902608' \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/contacts/bulk"

querystring = {"contactsIds":"861660d0-1807-44cb-b68f-c96381a741d6,1df1aa6d-0e5e-4a77-8dde-de601e902608"}

headers = {
    'Accept': "application/json",
    'Authorization': "Basic {{API_KEY}}"
    }

response = requests.request("DELETE", url, headers=headers, params=querystring)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/contacts/bulk');
$request->setMethod(HTTP_METH_DELETE);

$request->setQueryData(array(
  'contactsIds' => '861660d0-1807-44cb-b68f-c96381a741d6,1df1aa6d-0e5e-4a77-8dde-de601e902608'
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/contacts/bulk?contactsIds=861660d0-1807-44cb-b68f-c96381a741d6,1df1aa6d-0e5e-4a77-8dde-de601e902608")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/contacts/bulk',
    qs: {
        contactsIds: '861660d0-1807-44cb-b68f-c96381a741d6,1df1aa6d-0e5e-4a77-8dde-de601e902608'
    },
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

Status: 204

Method: DELETE

Path: /v1/contacts/bulk

Bulk delete contacts

Parameters

Name Type In Description
contactIds string query Contact IDs

Tags

Get tags

Request:

curl -X GET \
  'https://api.documo.com/v1/tags' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/tags"

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.get(url, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/tags');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/tags")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/tags',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

[
  {
    "tagId": "4c225812-81f1-4827-8194-b0e9475c54e6",
    "createdBy": "7b667809-c88f-4a27-b1fe-2cc932401e15",
    "name": "Healthcare",
    "color": "1E88E5",
    "isPublic": 1
  },
  {
    "tagId": "67ad1d52-c253-4441-a289-6ab8a124cc23",
    "createdBy": "7b667809-c88f-4a27-b1fe-2cc932401e15",
    "name": "Confidential",
    "color": "E91E63",
    "isPublic": 1
  }
]

Method: GET

Path: /v1/tags

Get tags list

Create tag

curl -X POST \
  https://api.documo.com/v1/tag \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'name=Documentation&color=ff0000&isPublic=true'
import requests

headers = {
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
    'Content-Type': 'application/x-www-form-urlencoded',
}

data = [
  ('name', 'Documentation'),
  ('color', 'ff0000'),
  ('isPublic', 'true'),
]

response = requests.post('https://api.documo.com/v1/tag', headers=headers, data=data)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/tag');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json',
  'Content-Type' => 'application/x-www-form-urlencoded'
));

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
  'name' => 'Documentation',
  'color' => 'ff0000',
  'isPublic' => 'true'
));

$response = $request->send();
echo $response->getBody();

require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/tag")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "color" => "ff0000",
  "isPublic" => "true",
  "name" => "Documentation",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(request)
end
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/tag',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
        name: 'Documentation',
        color: 'ff0000',
        isPublic: 'true'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

{
  "tagId": "b0514cef-92c4-43e1-8c7e-061ee72b0de1",
  "name": "Documentation",
  "color": "ff0000",
  "createdBy": "7b667809-c88f-4a27-b1fe-2cc932401e15",
  "isPublic": true
}

Method: POST

Path: /v1/tag

Create tag

Parameters

Name Type In Description
name integer formData Tag name
color string formData Tag color hex
isPublic boolean formData Tag will be shown for all users in the account

Delete tag

Request:

curl -X DELETE \
  https://api.documo.com/v1/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1 \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1"

headers = {
    'Accept': "application/json",
    'Authorization': "Basic {{API_KEY}}"
    }

response = requests.request("DELETE", url, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

Status: 204

Method: DELETE

Path: /v1/tag/{tagId}

Delete tag

Parameters

Name Type In Description
tagId string path Tag ID

Get fax tags

Request:

curl -X GET \
  'https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tags' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tags"

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.get(url, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tags');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tags")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tags',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

[
  {
    "tagId": "4c225812-81f1-4827-8194-b0e9475c54e6",
    "createdBy": "7b667809-c88f-4a27-b1fe-2cc932401e15",
    "name": "Healthcare",
    "color": "1E88E5",
    "isPublic": 1
  }
]

Method: GET

Path: /v1/fax/{messageId}/tags

Get tags list by Message ID

Parameters

Name Type In Description
messageId string path Unique message identifier provided by Documo

Assign tag to fax

curl -X POST \
  https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d tagId=b0514cef-92c4-43e1-8c7e-061ee72b0de1
import requests

headers = {
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
    'Content-Type': 'application/x-www-form-urlencoded',
}

data = [
  ('tagId', 'b0514cef-92c4-43e1-8c7e-061ee72b0de1')
]

response = requests.post('https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag', headers=headers, data=data)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json',
  'Content-Type' => 'application/x-www-form-urlencoded'
));

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
  'tagId' => 'b0514cef-92c4-43e1-8c7e-061ee72b0de1'
));

$response = $request->send();
echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "tagId" => "b0514cef-92c4-43e1-8c7e-061ee72b0de1",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(request)
end
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
        tagId: 'b0514cef-92c4-43e1-8c7e-061ee72b0de1'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

Status: 200

Method: POST

Path: /v1/fax/{messageId}/tag

Assign tag to fax

Parameters

Name Type In Description
messageId string formData Unique message identifier provided by Documo
tagId string formData Tag ID

Unassign tag from fax

Request:

curl -X DELETE \
  https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1 \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1"

headers = {
    'Accept': "application/json",
    'Authorization': "Basic {{API_KEY}}"
    }

response = requests.request("DELETE", url, headers=headers)

print(response.text)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/fax/00286047-b9e7-46d7-8cf5-df1bc0f94463/tag/b0514cef-92c4-43e1-8c7e-061ee72b0de1',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

Status: 204

Method: DELETE

Path: /v1/fax/{messageId}/tag/{tagId}

Unassign tag from fax

Parameters

Name Type In Description
messageId string path Unique message identifier provided by Documo
tagId string path Tag ID

Settings

Update user

Request:

curl -X PATCH  
'https://api.documo.com/v1/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de'  \
-H 'Content-Type: application/x-www-form-urlencoded'  \
-H 'Accept: application/json' \
-H 'Authorization: Basic {{API_KEY}}'  \
-d 'firstName=John' \
-d 'lastName=Doe' \ 
-d 'companyName=Doe%20INC' \
-d 'phone=12021234567' \
-d 'faxCallerId=12021234567' \
-d 'faxCsid=mFax' \
-d 'emailNotifySendOption=all' \
-d 'emailNotifyReceiveOption=all' \
-d 'emailNotifySendIncAttachment=true' \
-d 'emailNotifyReceiveIncAttachment=true' \
-d 'emailToFaxCoverPageOption=true' 
import requests

url = "https://api.documo.com/v1/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de"

headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
}

data = [
  ('firstName', 'John'),
  ('lastName', 'Doe'),
  ('phone', '12021234567'),
  ('faxCallerId', '12021234567'),
  ('faxCsid', 'mFax'),
  ('emailNotifySendOption', 'all'),
  ('emailNotifyReceiveOption', 'all'),
  ('emailNotifySendIncAttachment', 'true'),
  ('emailNotifyReceiveIncAttachment', 'true'),
  ('emailToFaxCoverPageOption', 'true'),
]

requests.post(url, headers=headers, data=data)
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->addForm(array(
  'firstName' => 'John',
  'lastName' => 'Doe',
  'companyName' => 'Acme Corp.',
  'phone' => '12345678900',
  'faxCallerId' => '12021234567',
  'faxCsid' => 'mFax',
  'emailNotifySendOption' => 'All',
  'emailNotifyReceiveOption' => 'All',
  'emailNotifySendIncAttachment' => 'true',
  'emailNotifyReceiveIncAttachment' => 'true'
), NULL);

$request->setRequestUrl('https://api.documo.com/v1/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de")
request = Net::HTTP::Patch.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "firstName" => "John",
  "lastName" => "Doe",
  "companyName" => "Doe INC",
  "phone" => "12021234567",
  "faxCallerId" => "12021234567",
  "faxCsid" => "mFax",
  "emailNotifySendOption" => "all",
  "emailNotifyReceiveOption" => "all",
  "emailNotifySendIncAttachment" => "true",
  "emailNotifyReceiveIncAttachment" => "true",
  "emailToFaxCoverPageOption" => "true",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'PATCH',
    url: 'https://api.documo.com/v1/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        'content-type': 'multipart/form-data'
    },
    formData: {
        firstName: 'John',
        lastName: 'Doe',
        companyName: 'Doe INC',
        phone: '12345678900',
        faxCallerId: '12021234567',
        faxCsid: 'mFax',
        emailNotifySendOption: 'All',
        emailNotifyReceiveOption: 'All',
        emailNotifySendIncAttachment: true,
        emailNotifyReceiveIncAttachment: true
    }
}, function(error, response, body) {
    console.log(body);
});

Response

{
  "settings": {
    "emailNotifySendOption": "All",
    "emailNotifyReceiveOption": "All",
    "emailNotifySendIncAttachment": true,
    "emailNotifyReceiveIncAttachment": true,
    "emailToFaxCoverPageOption": true
  },
  "userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
  "accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
  "email": "example@mail.com",
  "firstName": "John",
  "lastName": "Doe",
  "password": "",
  "userRole": "user",
  "isActive": true,
  "companyName": "Doe INC",
  "phone": "12021234567",
  "faxCsid": "mFax",
  "faxCallerId": "12021234567",
  "lastLoginIp": "127.0.0.1",
  "lastLoginDate": "2017-06-23T09:24:49.000Z",
  "isEmailConfirmed": true,
  "createdAt": "2017-06-06T11:23:11.000Z"
}

Method: PATCH

Path: /v1/user/{userId}

Updates user info and settings by user ID.

Parameters

Name Type In Description
userId string path User ID
firstName string formData First name on the card
lastName string formData Last name on the card
companyName string formData Company
phone string formData User phone
password string formData User password
faxCallerId string formData ID of fax caller
faxCsid string formData Unique fax ID
emailNotifySendOption string formData Outbound fax notification settings. Acceptable values: None, All (default), Success, Failure
emailNotifyReceiveOption string formData Inbound fax notification settings. Acceptable values: None, All (default), Success, Failure
emailNotifySendIncAttachment boolean formData Outbound fax notification attachment settings. Acceptable values: true (default), false
emailNotifyReceiveIncAttachment boolean formData Inbound fax notification attachment settings. Acceptable values: true (default), false
emailToFaxCoverPageOption boolean formData Email to Fax cover page option
webhookUrl string formData POST request to webhookUrl when received income fax. URL should start with http:// or https://

Admin

Next sections contain calls accessible by admin level users only.

Account

Create account

Request:

curl -X POST
  'https://api.documo.com/v1/accounts' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -F 'accountName=Night’s Watch' \
  -F 'faxCsid=mFax' \
  -F 'faxCallerId=12021234567'
import requests

url = "https://api.documo.com/v1/accounts"

headers = {
    'Authorization': 'Basic {{API_KEY}}',
    'content-type': 'application/x-www-form-urlencoded',
}

data = [
    ('accountName', 'Night’s Watch'),
    ('faxCsid', 'mFax'),
    ('faxCallerId', '12021234567'),
]

requests.post(url, headers=headers, data=data)

<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->addForm(array(
  'accountName' => 'Night’s Watch',
  'faxCsid' => 'mFax',    
  'faxCallerId' => '12021234567',
), NULL);

$request->setRequestUrl('https://api.documo.com/v1/accounts');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/accounts")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "accountName" => "Night’s Watch",
  "faxCsid" => "mFax",
  "faxCallerId" => "12021234567",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/users',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        'content-type': 'application/x-www-form-urlencoded'
    },
    formData: {
        accountName: 'Night’s Watch',
        faxCsid: "mFax",
        faxCallerId: "12021234567",
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
    "settings": {
      "emailNotifySendOption": "All",
      "emailNotifyReceiveOption": "All",
      "emailNotifySendIncAttachment": true,
      "emailNotifyReceiveIncAttachment": true,
      "timezone": "America/Los_Angeles",
      "emailToFax": true,
      "allowFaxAttachments": true,
      "usersTokenLife": 7200
    },
    "uuid": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
    "supportCode": "1201700000",
    "companyName": "Night’s Watch",
    "isReseller": true,
    "isActive": true,
    "defaultPaymentMethodId": "35fb8cc3-064b-4182-943a-76bf7e64725a",
    "parentId": null,
    "faxCsid": "mFax",
    "faxCallerId": "12021234567",
    "apiSecret": null,
    "childrenCount": 1,
    "usersCount": 17
}

Method: POST

Path: /v1/accounts

Creates subaccount or department for current user’s account.

Parameters

Name Type In Description
accountName string formData Account name
faxCallerId string formData ID of fax caller
faxCsid string formData Unique fax ID

Get accounts

Request:

curl -X GET 'https://api.documo.com/v1/accounts' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/accounts"

headers = {'Authorization': 'Basic {{API_KEY}}'}

requests.get(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/accounts');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/accounts")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/accounts',
    headers: {Authorization: 'Basic {{API_KEY}}'}
}, function (error, response, body) {
    if (error) throw new Error(error);

    console.log(body);
});

Response:

{
  "count": 1,
  "rows": [
    {
      "account": {
        "settings": {
          "emailNotifySendOption": "All",
          "emailNotifyReceiveOption": "All",
          "emailNotifySendIncAttachment": true,
          "emailNotifyReceiveIncAttachment": true,
          "timezone": "America/Los_Angeles",
          "emailToFax": true,
          "allowFaxAttachments": true,
          "usersTokenLife": 7200
        },
        "uuid": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
        "supportCode": "1201700000",
        "companyName": "Night’s Watch",
        "isReseller": true,
        "isActive": true,
        "defaultPaymentMethodId": "35fb8cc3-064b-4182-943a-76bf7e64725a",
        "parentId": null,
        "faxCsid": "mFax",
        "faxCallerId": "12021234567",
        "apiSecret": null,
        "childrenCount": 1,
        "usersCount": 17
      },
      "breadcrumb": []
    }
  ]
}

Method: GET

Path: /v1/accounts

Delivers JSON response with all sub accounts of current user account.

Parameters

Name Type In Description
accountType string query Account type. Acceptable values: owner, manager
include string query Include assigned settings or billings. Example: settings,billing
offset integer query Number of pages to return
limit integer query Amount of line items per page that will be returned
order integer query Sort response values by account_name, account_number, fax_csid, fax_caller_id in ascending or descending order. Example: account_name asc
query integer query Search by Account Name, Account Number, Fax CSID or Fax Caller ID

Get account info

Request:

curl -X GET 
'https://api.documo.com/v1/account/6c838c7c-cb48-4763-84d6-233b5f8cf782' \
-H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/account/6c838c7c-cb48-4763-84d6-233b5f8cf782"

headers = {
    'Authorization': "Basic {{API_KEY}}",
    }

requests.get(url, headers=headers)
<?php
$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/account/6c838c7c-cb48-4763-84d6-233b5f8cf782');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/account/6c838c7c-cb48-4763-84d6-233b5f8cf782")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/account/6c838c7c-cb48-4763-84d6-233b5f8cf782',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "account": {
    "settings": {
      "emailNotifySendOption": "All",
      "emailNotifyReceiveOption": "All",
      "emailNotifySendIncAttachment": true,
      "emailNotifyReceiveIncAttachment": true,
      "timezone": "America/Los_Angeles",
      "emailToFax": true,
      "allowFaxAttachments": true,
      "usersTokenLife": 7200
    },
    "uuid": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
    "supportCode": "2201767761",
    "companyName": "Documo",
    "isReseller": true,
    "isActive": true,
    "defaultPaymentMethodId": "35fb8cc3-064b-4182-943a-76bf7e64725a",
    "parentId": null,
    "faxCsid": "mFax",
    "faxCallerId": "12021234567",
    "apiSecret": null,
    "childrenCount": 1,
    "usersCount": 17
  },
  "breadcrumb": []
}

Method: GET

Path: /v1/account/{accountId}

Delivers JSON response with current account info and settings.

Parameters

Name Type In Description
accountId string path Account ID

Update account

Request:

curl -X PATCH \
  'https://api.documo.com/v1/account/ad39a2c2-d154-4170-83e4-a75fa5466d33' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -H 'postman-token: 4fde4be1-fe1c-9447-7957-8484140f5919' \
  -d 'companyName=COMPANY&emailNotifySendOption=all&emailNotifyReceiveOption=all&emailNotifySendIncAttachment=true&emailNotifyReceiveIncAttachment=true&timezone=America%252FLos_Angeles&usersTokenLife=14400&emailToFax=true&allowFaxAttachments=true'
import requests

url = "https://api.documo.com/v1/account/ad39a2c2-d154-4170-83e4-a75fa5466d33"

headers = {
    'accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
    'cache-control': 'no-cache',
    'content-type': 'application/x-www-form-urlencoded',
    'postman-token': '6d0a0cc6-af1c-645d-e8d0-abfd93a9edd6',
}

data = [
  ('companyName', 'COMPANY'),
  ('emailNotifySendOption', 'all'),
  ('emailNotifyReceiveOption', 'all'),
  ('emailNotifySendIncAttachment', 'true'),
  ('emailNotifyReceiveIncAttachment', 'true'),
  ('timezone', 'America%2FLos_Angeles'),
  ('usersTokenLife', '14400'),
  ('emailToFax', 'true'),
  ('allowFaxAttachments', 'true'),
]

requests.post(url, headers=headers, data=data)

const request = require("request");

request({
    method: 'PATCH',
    url: 'https://api.documo.com/v1/account/ad39a2c2-d154-4170-83e4-a75fa5466d33',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        accept: 'application/json',
        'content-type': 'application/x-www-form-urlencoded'
    },
    form: {
        companyName: 'COMPANY',
        emailNotifySendOption: 'all',
        emailNotifyReceiveOption: 'all',
        emailNotifySendIncAttachment: 'true',
        emailNotifyReceiveIncAttachment: 'true',
        timezone: 'America%2FLos_Angeles',
        usersTokenLife: '14400',
        emailToFax: 'true',
        allowFaxAttachments: 'true'
    }
}, function(error, response, body) {
    console.log(body);
});
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append(new http\QueryString(array(
  'companyName' => 'COMPANY',
  'emailNotifySendOption' => 'all',
  'emailNotifyReceiveOption' => 'all',
  'emailNotifySendIncAttachment' => 'true',
  'emailNotifyReceiveIncAttachment' => 'true',
  'timezone' => 'America%2FLos_Angeles',
  'usersTokenLife' => '14400',
  'emailToFax' => 'true',
  'allowFaxAttachments' => 'true'
)));

$request->setRequestUrl('https://api.documo.com/v1/account/ad39a2c2-d154-4170-83e4-a75fa5466d33');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'accept' => 'application/json',
  'content-type' => 'application/x-www-form-urlencoded'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/account/ad39a2c2-d154-4170-83e4-a75fa5466d33")
request = Net::HTTP::Patch.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "companyName" => "COMPANY",
  "emailNotifySendOption" => "all",
  "emailNotifyReceiveOption" => "all",
  "emailNotifySendIncAttachment" => "true",
  "emailNotifyReceiveIncAttachment" => "true",
  "timezone" => "America%2FLos_Angeles",
  "usersTokenLife" => "14400",
  "emailToFax" => "true",
  "allowFaxAttachments" => "true",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body

Response:

{
  "account": {
    "settings": {
      "emailNotifySendOption": "All",
      "emailNotifyReceiveOption": "All",
      "emailNotifySendIncAttachment": true,
      "emailNotifyReceiveIncAttachment": true,
      "timezone": "America/Los_Angeles",
      "emailToFax": true,
      "allowFaxAttachments": true,
      "usersTokenLife": 7200
    },
    "uuid": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
    "supportCode": "2201767761",
    "companyName": "Documo",
    "isReseller": true,
    "isActive": true,
    "defaultPaymentMethodId": "35fb8cc3-064b-4182-943a-76bf7e64725a",
    "parentId": "ad39a2c2-d154-4170-83e4-a75fa5466d33",
    "faxCsid": "mFax",
    "faxCallerId": "12021234567",
    "apiSecret": null,
    "childrenCount": 1,
    "usersCount": 17
  },
  "ancestors": []
}

Method: PATCH

Path: /v1/account/{accountId}

This method will allow you to modify global account settings and info. You will need to pass through the account ID and will also need administrative privileges to access.

Parameters

Name Type In Description
accountId string path Account ID
companyName string formData Name of the company
faxCallerId string formData ID of fax caller
faxCsid string formData Unique fax ID
emailNotifySendOption string formData Outbound fax notification settings. Acceptable values: None, All (default), Success, Failure
emailNotifyReceiveOption string formData Inbound fax notification settings. Acceptable values: None, All (default), Success, Failure
emailNotifySendIncAttachment boolean formData Outbound fax notification attachment settings. Acceptable values: true (default), false
emailNotifyReceiveIncAttachment boolean formData Inbound fax notification attachment settings. Acceptable values: true (default), false
timezone string formData Timezone
emailToFax boolean formData Email to Fax
usersTokenLife integer formData Set manual user token time for this account
webhookUrl string formData POST request to webhookUrl when received income fax. URL should start with http:// or https://

Create a user

Request:

curl -X POST
  'https://api.documo.com/v1/users' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -F 'firstName=John' \
  -F 'lastName=Doe' \
  -F 'email=example@mail.com' \
  -F 'phone=123456789' \
  -F 'password=Passw0rd' \
  -F 'userRole=user'
import requests

url = "https://api.documo.com/v1/users"

headers = {
    'Authorization': 'Basic {{API_KEY}}',
    'content-type': 'application/x-www-form-urlencoded',
}

data = [
    ('accountId', '12345678-abcd-1234-5678-abcdfg123456'),
    ('firstName', 'John'),
    ('lastName', 'Doe'),
    ('email', 'example@mail.com'),
    ('phone', '123456789'),
    ('password', 'Passw0rd'),
    ('userRole', 'user'),
]

requests.post(url, headers=headers, data=data)

<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->addForm(array(
  'accountId' => '12345678-abcd-1234-5678-abcdfg123456',
  'firstName' => 'John',
  'lastName' => 'Doe',
  'email' => 'example@mail.com',
  'phone' => '123456789',
  'password' => 'Passw0rd',
  'userRole' => 'user'
), NULL);

$request->setRequestUrl('https://api.documo.com/v1/users');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();

require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/users")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "accountId" => "12345678-abcd-1234-5678-abcdfg123456",
  "firstName" => "John",
  "lastName" => "Doe",
  "email" => "example@mail.com",
  "phone" => "123456789",
  "password" => "Passw0rd",
  "userRole" => "user",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/users',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        'content-type': 'application/x-www-form-urlencoded'
    },
    formData: {
        accountId: '12345678-abcd-1234-5678-abcdfg123456',
        firstName: 'John',
        lastName: 'Doe',
        email: 'example@mail.com',
        phone: '123456789',
        password: 'Passw0rd',
        userRole: 'user'
    }
}, function(error, response, body) {
    console.log(body);
});

Note that userRole = user is default. Another option is to set user role to admin.

accountId param is optional. If it is not set, user will be assigned to your current account.

Response:

{
  "settings": {
    "emailNotifySendOption": "All",
    "emailNotifyReceiveOption": "All",
    "emailNotifySendIncAttachment": true,
    "emailNotifyReceiveIncAttachment": true,
    "emailToFaxCoverPageOption": true
  },
  "userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
  "accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
  "email": "example@mail.com",
  "firstName": "John",
  "lastName": "Doe",
  "password": "",
  "userRole": "user",
  "isActive": true,
  "companyName": "Doe INC",
  "phone": "12021234567",
  "faxCsid": "mFax",
  "faxCallerId": "12021234567",
  "lastLoginIp": "127.0.0.1",
  "lastLoginDate": "2017-06-23T09:24:49.000Z",
  "account": {
    "settings": {
      "emailNotifySendOption": "All",
      "emailNotifyReceiveOption": "All",
      "emailNotifySendIncAttachment": true,
      "emailNotifyReceiveIncAttachment": true,
      "timezone": "America/Los_Angeles",
      "emailToFax": true,
      "storeFaxesTime": 12,
      "allowFaxAttachments": true,
      "usersTokenLife": 7200
    },
    "uuid": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
    "supportCode": "2201767761",
    "companyName": "Documo",
    "isReseller": true,
    "isActive": true,
    "parentId": null,
    "faxCsid": "mFax",
    "faxCallerId": "12021234567"
  }
}

Method: POST

Path: /v1/users

Creates a user for account that is specified in path.

Parameters

Name Type In Description
firstName string formData First name on the card
lastName string formData Last name on the card
companyName string formData Company
password string formData User password
userRole string formData User role
accountId string formData Account ID
phone string formData User phone

Create API key for user

Request:

curl -X PUT \
  'https://api.documo.com/v1/users/7b667809-c88f-4a27-b1fe-2cc932401e15/api?disable=false' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/users/7b667809-c88f-4a27-b1fe-2cc932401e15/api"

querystring = {"disable":"false"}

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.put(url, headers=headers, params=querystring)
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/users/7b667809-c88f-4a27-b1fe-2cc932401e15/api")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'
params = { :disable => 'false' }
uri.query = URI.encode_www_form(params)

response = http.request(request)
puts response.read_body
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/users/7b667809-c88f-4a27-b1fe-2cc932401e15/api');
$request->setMethod(HTTP_METH_PUT);

$request->setQueryData(array(
  'disable' => 'false'
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
const request = require("request");

request({
    method: 'PUT',
    url: 'https://api.documo.com/v1/users/7b667809-c88f-4a27-b1fe-2cc932401e15/api',
    qs: {
        disable: 'false'
    },
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

"API_KEY"

Method: PUT

Path: /v1/users/{userId}/api

Generates API key for user that is specified in path.

Parameters

Name Type In Description
userId string path User ID
disable string query If true, than access by API key will revoke

Delete user

Request:

curl -X DELETE
  'https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de"

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.delete(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();

require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

Status: 200
Message: OK

Method: DELETE

Path: /v1/users/{userId}

Deletes user and unassign all fax numbers.

Parameters

Parameter Data Type In Description
userId string path User ID

Get one user

Request:

curl -X GET
  'https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de"

headers = {
    'Authorization': 'Basic {{API_KEY}}'
}

requests.get(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/users/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "settings": {
    "emailNotifySendOption": "All",
    "emailNotifyReceiveOption": "All",
    "emailNotifySendIncAttachment": true,
    "emailNotifyReceiveIncAttachment": true,
    "emailToFaxCoverPageOption": true
  },
  "userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
  "accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
  "email": "example@mail.com",
  "firstName": "John",
  "lastName": "Doe",
  "password": "",
  "userRole": "user",
  "isActive": true,
  "companyName": "Doe INC",
  "phone": "12021234567",
  "faxCsid": "mFax",
  "faxCallerId": "12021234567",
  "lastLoginIp": "127.0.0.1",
  "lastLoginDate": "2017-06-23T09:24:49.000Z",
  "isEmailConfirmed": true,
  "createdAt": "2017-06-06T11:23:11.000Z",
  "account": {
    "settings": {
      "emailNotifySendOption": "All",
      "emailNotifyReceiveOption": "All",
      "emailNotifySendIncAttachment": true,
      "emailNotifyReceiveIncAttachment": true,
      "timezone": "America/Los_Angeles",
      "emailToFax": true,
      "storeFaxesTime": 12,
      "allowFaxAttachments": true,
      "usersTokenLife": 7200
    },
    "uuid": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
    "supportCode": "2201767761",
    "companyName": "Documo",
    "isReseller": true,
    "isActive": true,
    "parentId": null,
    "faxCsid": "mFax",
    "faxCallerId": "12021234567"
  }
}

Method: GET

Path: /v1/users/{userId}

Get user by ID.

Parameters

Name Type In Description
userId string path User ID

Get users

Request:

curl -X GET
  'https://api.documo.com/v1/users?accountId=fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de&offset=0&limit=10' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/users"

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.get(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/users');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require('request');

request({
    url: 'https://api.documo.com/v1/users',
    headers: {
        Accept: 'application/json',
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
    "count": 10,
    "rows": [
      {
        "settings": {
          // User settings
        },
        // User info
        "account": {
          "settings": {
           // Account settings
          },
          // Account info
        }
      },
      ...
    ]
}

Method: GET

Path: /v1/users

Get all users for account that is specified in path.

Parameters

Name Type In Description
accountId string path Account’s UUID
limit number query Amount of line items per page that will be returned
offset number query Number of pages to return (used for pagination)
query string query Search by email, first name, last name, phone, fax_csid and fax_caller_id
order string query Result order. Available values: email first_name last_name users_count last_login_date + asc desc. E.g: email asc

Numbers

Retrieve fax numbers

Request:

curl -X GET
'https://api.documo.com/v1/numbers?offset=1&limit=2&query=Test' \
-H 'Accept: application/json'  \
-H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/numbers"

headers = {
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
}

params = (
    ('offset', '1'),
    ('limit', '2'),
    ('query', 'Test'),
)

requests.get(url, headers=headers, params=params)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'offset' => '1',
  'limit' => '2',
  'query' => 'Test'
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/numbers")
request = Net::HTTP::Get.new(uri)
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
params = { :offset => 10, :limit => 3, :query => 'Test' }
uri.query = URI.encode_www_form(params)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/numbers/6c838c7c-cb48-4763-84d6-233b5f8cf782',
    qs: {
        offset: '1',
        limit: '2',
        query: 'Test'
    },
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

 {
  "rows": [
    {
      "uuid": "04d651f6-5092-44a1-bbd4-822a0ab43d29",
      "number": "3144508380",
      "pendingUntil": null,
      "ownedBy": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
      "managedBy": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
      "faxbridgeUsing": false,
      "faxbridge": {
        "deviceCode": "210000000000",
        "name": "FaxBridge",
        "isActive": true
      },
      "webhookUrl": null,
      "users": [
        {
          "userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
          "accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
          "email": "example@mail.com",
          "firstName": "John",
          "lastName": "Doe",
          "isActive": true,
          "avatarUrl": null
        }
      ],
      "owner": {
        "uuid": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
        "supportCode": "1201700000",
        "companyName": "Night’s Watch",
        "isActive": true
      },
      "manager": {
        "uuid": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
        "supportCode": "1201700000",
        "companyName": "Night’s Watch",
        "isActive": true
      }
    }
  ],
  "count": 1718,
  "limit": 100,
  "offset": 0
}

Method: GET

Path: /v1/numbers

Returns all fax numbers owned by account

Parameters

Parameter Data Type In Description
accountId string query Account ID
offset integer query Number of pages to return
limit integer query Amount of line items per page that will be returned
query string query Search query
accountType string query Account type. Acceptable values: owner, manager. Required is account ID is set

Add user to fax number

Request:

curl -X POST
'https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de"

headers = {
    'Authorization': "Basic {{API_KEY}}",
    'content-type': "application/x-www-form-urlencoded"
    }

requests.post(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'content-type' => 'application/x-www-form-urlencoded',
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "uuid": "7cd0224e-ee05-4f32-9f56-9a4ebf83a38c",
  "number": "3122833994",
  "pendingUntil": null,
  "ownedBy": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
  "createdAt": "2017-06-06T11:37:14.000Z",
  "users": [
    {
      "userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
      "accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
      "email": "example@mail.com",
      "firstName": "John",
      "lastName": "Doe",
      "isActive": true,
      "avatarUrl": null
    }
  ],
  "manager": {
      "uuid": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
      "supportCode": "1201700000",
      "companyName": "Night’s Watch",
      "isActive": true
  }
}

Method: POST

Path: /v1/numbers/{numberId}/user/{userId}

Add users to fax numbers. Only users from account that manages this number can be assigned. Inbound faxes are accessible by the assigned user(s).

Parameters

Parameter Data Type In Description
numberId string path Number ID of fax number
userId string path User ID

Unassign user from fax number

Request:

curl -X DELETE
'https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de"

headers = {
    'Authorization': "Basic {{API_KEY}}",
    'content-type': "application/x-www-form-urlencoded"
    }

requests.delete(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'content-type' => 'application/x-www-form-urlencoded',
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de")
request = Net::HTTP::Delete.new(uri)
request.content_type = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/user/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

Status: 204

Method: DELETE

Path: /v1/numbers/{numberId}/user/{userId}

Remove user from fax number.

Parameters

Parameter Data Type In Description
numberId string path Number ID of fax number
userId string path User ID

Assign manager to fax number

Request:

curl -X POST
'https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager/8d3165b3-d23c-4cb4-9bee-b33013c008f7' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager/8d3165b3-d23c-4cb4-9bee-b33013c008f7"

headers = {
    'Authorization': "Basic {{API_KEY}}",
    'content-type': "application/x-www-form-urlencoded"
    }

requests.post(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager/8d3165b3-d23c-4cb4-9bee-b33013c008f7');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'content-type' => 'application/x-www-form-urlencoded',
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager/8d3165b3-d23c-4cb4-9bee-b33013c008f7")
request = Net::HTTP::Post.new(uri)
request.content_type = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager/8d3165b3-d23c-4cb4-9bee-b33013c008f7',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "uuid": "7cd0224e-ee05-4f32-9f56-9a4ebf83a38c",
  "number": "3122833994",
  "pendingUntil": null,
  "ownedBy": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
  "createdAt": "2017-06-06T11:37:14.000Z",
  "users": [
    {
      "userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
      "accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
      "email": "example@mail.com",
      "firstName": "John",
      "lastName": "Doe",
      "isActive": true,
      "avatarUrl": null
    }
  ],
  "manager": {
      "uuid": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
      "supportCode": "1201700000",
      "companyName": "Night’s Watch",
      "isActive": true
  }
}

Method: POST

Path: /v1/numbers/{numberId}/manager/{accountId}

Assigns manager to fax number.

Parameters

Parameter Data Type In Description
numberId string path Number ID of fax number
accountId string path Account ID

Unassign manager from fax number

Request:

curl -X DELETE
'https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager/' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager"

headers = {
    'Authorization': "Basic {{API_KEY}}",
    'content-type': "application/x-www-form-urlencoded"
    }

requests.delete(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'content-type' => 'application/x-www-form-urlencoded',
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager")
request = Net::HTTP::Delete.new(uri)
request.content_type = "application/json"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/numbers/7cd0224e-ee05-4f32-9f56-9a4ebf83a38c/manager',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

Status: 204

Method: DELETE

Path: /v1/numbers/{numberId}/manager

Remove manager from fax number.

Parameters

Parameter Data Type In Description
numberId string path Number ID of fax number

Provision fax numbers

Request:

curl -X POST \
  'https://api.documo.com/v1/numbers/provision?type=toll-free' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/numbers/provision"

querystring = {"type":"toll-free"}

headers = {
  'accept': "application/json",
  'Authorization': "Basic {{API_KEY}}"
}

requests.post(url, headers=headers, params=querystring)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers/provision');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData(array(
  'type' => 'toll-free',
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'accept' => 'application/json'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/numbers/provision")
params = { :type => "toll-free"}
uri.query = URI.encode_www_form(params)

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/numbers/provision',
    qs: {
        type: 'toll-free',
    },
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        accept: 'application/json'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

[
  {
    "uuid": "2d65b607-1833-4576-b497-650b56d6346b",
    "number": "8440000000",
    "pendingUntil": null,
    "ownedBy": "f6309861-9ca9-44ea-84ab-a193615e4936",
    "managedBy": "f6309861-9ca9-44ea-84ab-a193615e4936",
    "createdAt": "2017-06-26T15:35:13.000Z",
    "owner": {
      "uuid": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
      "supportCode": "1201700000",
      "companyName": "Night’s Watch",
      "isActive": true
    },
    "manager": {
      "uuid": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
      "supportCode": "1201700000",
      "companyName": "Night’s Watch",
      "isActive": true
    }
  }
]

Method: POST

Path: /v1/numbers/provision

Provision new fax numbers.

Parameters

Parameter Data Type In Description
type string path Acceptable values: local - use numbers found using Search for Available Numbers endpoint. If set - requires number to be set. If toll-free is set, the API will return available numbers at random in quantity you specify.
number string formData Numbers list in E164 format. Separated by comma.
quantity integer formData Toll-free numbers quantity. If not set - equal to 1

Search for available numbers

Request:

curl -X GET \
  'https://api.documo.com/v1/numbers/provision/search?npa=934&nxx=800&state=NY' \
  -H 'accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/numbers/provision/search"

querystring = {
    "npa":"934",
    "nxx":"800",
    "state":"NV",
    "city":"Las Vegas",
}

headers = {
  'accept': "application/json",
  'Authorization': "Basic {{API_KEY}}"
}

requests.get(url, headers=headers, params=querystring)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers/provision/search');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'npa' => '934',
  'nxx' => '800',
  'state' => 'NV',
  'city' => 'Las Vegas'
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'accept' => 'application/json'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/numbers/provision/search")
params = { 
    :npa => 934, 
    :nxx => 800,
    :state => 'NV'
    :city => 'Las Vegas'
}
uri.query = URI.encode_www_form(params)

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/numbers/provision/search',
    qs: {
        npa: 934,
        nxx: 800,
        state: 'NV',
        city: 'Las Vegas',
    },
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        accept: 'application/json'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "result": [
    {
      "number_e164": "+17025551234",
      "regional_data": {
        "country_iso": "US",
        "rate_center": "LAS VEGAS",
        "state": "NV"
      },
      "preferable": true,
    },
    ...
  ],
  "limit": 10
}

Method: GET

Path: /v1/numbers/provision/search

Allows you to search for available local numbers. Search by area code/prefix (npa/nxx), city, or zip code. Returns list of available numbers

Parameters

Parameter Data Type In Description
npa string query 3-digit Numbering Plan Area Code
nxx string query Central Office (aka. Exchange) within the NPA
state string query State
city string query City. State param required for search by city.
zipcode string query ZIP Code

Number settings

curl -X PUT \
  https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5 \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d storage=%7B%22protocol%22%3A%22ftp%22%2C%22host%22%3A%22example.com%22%2C%22outputDirPath%22%3A%22uploads%2F%22%2C%22password%22%3A%22password%22%2C%22user%22%3A%22user%22%2C%22port%22%3A%2221%22%7D
import requests
import json

url = "https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5"

storage = {
    "protocol":"ftp",
    "host":"example.com",
    "outputDirPath":"uploads/",
    "password":"password",
    "user":"user",
    "port":"21"
    }

payload = {'storage': json.dumps(storage)}

headers = {
    'Content-Type': "application/x-www-form-urlencoded",
    'Accept': "application/json",
    'Authorization': "Basic {{API_KEY}}"
    }

response = requests.request("PUT", url, params=payload, headers=headers)

print(response.text)
require 'net/http'
require 'uri'
require 'json'

uri = URI.parse("https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5")
storage = {
    :protocol => 'ftp',
    :host => 'example.com',
    :outputDirPath => 'uploads',
    :password => 'password',
    :user => 'user',
    :port => 21
}

request = Net::HTTP::Put.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "storage" => storage.to_json,
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
  http.request(request)
end
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json',
  'Content-Type' => 'application/x-www-form-urlencoded'
));

$storage->protocol = "ftp";
$storage->host = "example.com";
$storage->outputDirPath = "uploads/";
$storage->password = "password";
$storage->user = "user";
$storage->port = "21";

$request->setContentType('application/x-www-form-urlencoded');
$request->setPostFields(array(
  'storage' => json.encode($storage)
));

$response = $request->send();
echo $response->getBody();
const request = require("request");

request({
    method: 'PUT',
    url: 'https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json',
        'Content-Type': 'application/x-www-form-urlencoded'
    },
    form: {
        storage: JSON.stringify({
            protocol: "ftp",
            host: "example.com",
            outputDirPath: "uploads/",
            password: "password",
            user: "user",
            port: 21
        })
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

{
  "uuid": "7cd0224e-ee05-4f32-9f56-9a4ebf83a38c",
  "number": "3122833994",
  "pendingUntil": null,
  "storage": "{\"protocol\":\"ftp\",\"host\":\"example.com\",\"outputDirPath\":\"uploads/\",\"password\":\"password\",\"user\":\"user\",\"port\":21}", 
  "ownedBy": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
  "createdAt": "2017-06-06T11:37:14.000Z",
  "users": [
    {
      "userId": "fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de",
      "accountId": "6c838c7c-cb48-4763-84d6-233b5f8cf782",
      "email": "example@mail.com",
      "firstName": "John",
      "lastName": "Doe",
      "isActive": true,
      "avatarUrl": null
    }
  ],
  "manager": {
      "uuid": "8d3165b3-d23c-4cb4-9bee-b33013c008f7",
      "supportCode": "1201700000",
      "companyName": "Night’s Watch",
      "isActive": true
  }
}

Method: PUT

Path: /v1/numbers/{numberId}

Storage settings of number

Parameters

Parameter Data Type In Description
numberId string query Number ID
storage string formData FTP/SFTP storage credentials in JSON format
webhookUrl string formData New Webhook URL. Set empty string for disabling Webhook

Release number

Request:

curl -X DELETE \
  https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5/release \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5/release"

headers = {
    'Accept': "application/json",
    'Authorization': "Basic {{API_KEY}}"
    }

response = requests.request("DELETE", url, headers=headers)
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5/release")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5/release');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}',
  'Accept' => 'application/json'
));

$response = $request->send();
echo $response->getBody();
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/numbers/00708ad6-7981-43fe-94d9-7c74b36f70d5/release',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        Accept: 'application/json'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

Status: 204

Method: DELETE

Path: /v1/numbers/{numberId}/release

Release fax number by number ID and move it to pending.

Parameters

Parameter Data Type In Description
numberId string query Number ID

FaxBridge

Get FaxBridges

Request:

curl -X GET
  'https://api.documo.com/v1/accounts/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de/faxbridges?offset=0&limit=10?' \
  -H 'Authorization: Basic {{API_KEY}}'
import requests

url = "https://api.documo.com/v1/accounts/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de/faxbridges"

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.get(url, headers=headers)
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/accounts/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de/faxbridges');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
echo $response->getBody();
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/accounts/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de/faxbridges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require('request');

request({
    url: 'https://api.documo.com/v1/accounts/fdb9f0dd-ac0c-4f3e-8e4b-1be0225186de/faxbridges',
    headers: {
        Accept: 'application/json',
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "count": 1,
  "rows": [
    {
      "deviceCode": "216061830920",
      "name": "FaxBridge",
      "isActive": true,
      "ownedByAccount": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
      "faxNumberId": "e7c885cf-6045-43f4-8eb5-2d6c68071292",
      "eventDate": "2017-08-21T20:34:00.000Z",
      "activateDate": "2017-03-24T17:02:00.000Z",
      "ipAddressPublic": "68.104.9.224",
      "ipAddressPrivate": "192.168.0.4",
      "firmware": "20170702B",
      "macAddress": "D8FB11618309",
      "printSentConfirmation": true,
      "printIncomingFaxes": true,
      "number": {
        "uuid": "e7c885cf-6045-43f4-8eb5-2d6c68071292",
        "number": "4697292693",
        "pendingUntil": null,
        "ownedBy": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
        "createdAt": "2017-07-15T17:49:05.000Z",
        "faxbridgeUsing": true
      }
    }
  ],
  "offset": 0,
  "limit": 20
}

Method: GET

Path: /v1/accounts/{accountId}/faxbridges

Get FaxBridges list owned by account.

Parameters

Name Type In Description
accountId string path Account ID
offset string query Offset
limit string query Limit

Change FaxBridge settings

Request:

curl -X PATCH
'https://api.documo.com/v1/faxbridges/216061830920'  \
-H 'Content-Type: application/x-www-form-urlencoded'  \
-H 'Accept: application/json' \
-H 'Authorization: Basic {{API_KEY}}'  \
-d 'name=FaxBridge' \
-d 'printSentConfirmation=true' \
-d 'printIncomingFaxes=true'
import requests

url = "https://api.documo.com/v1/faxbridges/216061830920"

headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Accept': 'application/json',
    'Authorization': 'Basic {{API_KEY}}',
}

data = [
  ('name', 'FaxBridge'),
  ('printSentConfirmation', 'true'),
  ('printIncomingFaxes', 'true'),
]

requests.post(url, headers=headers, data=data)
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->addForm(array(
  'name' => 'FaxBridge',
  'printSentConfirmation' => 'true',
  'printIncomingFaxes' => 'true'
), NULL);

$request->setRequestUrl('https://api.documo.com/v1/faxbridges/216061830920');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
require 'net/http'
require 'uri'

uri = URI.parse("https://api.documo.com/v1/faxbridges/216061830920")
request = Net::HTTP::Patch.new(uri)
request.content_type = "application/x-www-form-urlencoded"
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"
request.set_form_data(
  "name" => "FaxBridge",
  "printSentConfirmation" => "true",
  "printIncomingFaxes" => "true",
)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'PATCH',
    url: 'https://api.documo.com/v1/faxbridges/216061830920',
    headers: {
        Authorization: 'Basic {{API_KEY}}',
        'content-type': 'multipart/form-data'
    },
    formData: {
        name: 'FaxBridge',
        printSentConfirmation: true,
        printIncomingFaxes: true
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "activateDate": "2017-03-24T17:02:00.000Z",
  "createdAt": "2017-08-09T15:16:32.000Z",
  "deviceCode": "216061830920",
  "eventDate": "2017-08-21T20:59:00.000Z",
  "faxNumberId": "e7c885cf-6045-43f4-8eb5-2d6c68071292",
  "firmware": "20170702B",
  "ipAddressPrivate": "192.168.0.4",
  "ipAddressPublic": "68.104.9.224",
  "isActive": true,
  "macAddress": "D8FB11618309",
  "name": "FaxBridge",
  "ownedByAccount": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
  "printIncomingFaxes": false,
  "printSentConfirmation": true
}

Method: PUT

Path: /v1/faxbridges/{deviceCode}/settings

Change FaxBridge settings.

Parameters

Name Type In Description
deviceCode string path FaxBridge device code
name string formData Customize FaxBridge name
printSentConfirmation boolean formData Print sent confirmation
printIncomingFaxes boolean formData Print incoming faxes

Assign a fax number to FaxBridge

Request:

curl -X POST \
  https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292 \
  -H 'Authorization: Basic {{API_KEY}}'
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
import requests

url = "https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292"

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

response = requests.request("POST", url, headers=headers)
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'POST',
    url: 'https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "deviceCode": "216061830920",
  "name": "FaxBridge",
  "isActive": true,
  "ownedByAccount": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
  "faxNumberId": "e7c885cf-6045-43f4-8eb5-2d6c68071292",
  "eventDate": "2017-08-22T10:03:00.000Z",
  "activateDate": "2017-03-24T17:02:00.000Z",
  "ipAddressPublic": "68.104.9.224",
  "ipAddressPrivate": "192.168.0.4",
  "firmware": "20170702B",
  "macAddress": "D8FB11618309",
  "printSentConfirmation": true,
  "printIncomingFaxes": true,
  "account": {
    "uuid": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
    "supportCode": "1201734191",
    "companyName": "Documo Dev",
    "isActive": true
  },
  "number": {
    "uuid": "e7c885cf-6045-43f4-8eb5-2d6c68071292",
    "number": "4697292693",
    "pendingUntil": null,
    "ownedBy": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
    "createdAt": "2017-07-15T17:49:05.000Z",
    "faxbridgeUsing": true
  }
}

Method: POST

Path: /v1/faxbridges/{deviceCode}/numbers/{numberId}

Assign a fax number to a FaxBridge. This fax number should be already assigned to an account or user.

Parameters

Name Type In Description
deviceCode string path FaxBridge device code
numberId string path Fax number ID

Release a fax number from FaxBridge

Request:

curl -X DELETE \
  https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292 \
  -H 'Authorization: Basic {{API_KEY}}'
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

$response = $request->send();
import requests

url = "https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292"

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

response = requests.request("DELETE", url, headers=headers)
require 'uri'
require 'net/http'

url = URI("https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Basic {{API_KEY}}'

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'DELETE',
    url: 'https://api.documo.com/v1/faxbridges/216061830920/numbers/e7c885cf-6045-43f4-8eb5-2d6c68071292',
    headers: {
        Authorization: 'Basic {{API_KEY}}'
    }
}, function(error, response, body) {
    console.log(body);
});

Response:

{
  "deviceCode": "216061830920",
  "name": "FaxBridge",
  "isActive": true,
  "ownedByAccount": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
  "faxNumberId": null,
  "eventDate": "2017-08-22T10:03:00.000Z",
  "activateDate": "2017-03-24T17:02:00.000Z",
  "ipAddressPublic": "68.104.9.224",
  "ipAddressPrivate": "192.168.0.4",
  "firmware": "20170702B",
  "macAddress": "D8FB11618309",
  "printSentConfirmation": true,
  "printIncomingFaxes": true,
  "account": {
    "uuid": "efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
    "supportCode": "1201734191",
    "companyName": "Documo Dev",
    "isActive": true
  }
}

Method: DELETE

Path: /v1/faxbridges/{deviceCode}/numbers/{numberId}

Release a fax number from a FaxBridge.

Parameters

Name Type In Description
deviceCode string path FaxBridge device code
numberId string path Fax number ID

Reports

Summary Report

Request:

curl -X GET \
  'https://api.documo.com/v1/reports/summary?startDate=2017-01-01T00:00:00.000Z&endDate=2027-01-01T00:00:00.000Z&csv=false&limit=50&includeSubaccounts=false&accountId=efaa36f7-d9a0-493f-a3aa-0cb1114eea0c&offset=0&reportState=accounts' \
  -H 'Authorization: Basic {{API_KEY}}'
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo/v1/reports/summary');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'startDate' => '2017-01-01T00:00:00.000Z',
  'endDate' => '2027-01-01T00:00:00.000Z',
  'csv' => 'false',
  'limit' => '50',
  'includeSubaccounts' => 'false',
  'accountId' => 'efaa36f7-d9a0-493f-a3aa-0cb1114eea0c',
  'offset' => '0',
  'reportState' => 'accounts',
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

  $response = $request->send();
  echo $response->getBody();
import requests

url = "https://api.documo.com/v1/reports/summary"

querystring = {
    "startDate":"2017-01-01T00:00:00.000Z",
    "endDate":"2027-01-01T00:00:00.000Z",
    "csv":"false",
    "limit":"50",
    "includeSubaccounts":"false",
    "accountId":"efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
    "offset":"0",
    "reportState":"accounts"
    }

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.get(url, headers=headers, params=querystring)
require 'uri'
require 'net/http'

uri = URI.parse("https://api.documo.com/v1/reports/summary")

request = Net::HTTP::Get.new(uri)
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"

params = {
    :startDate => '2017-01-01T00:00:00.000Z',
    :endDate => '2027-01-01T00:00:00.000Z',
    :csv => false,
    :limit => 50,
    :includeSubaccounts => false,
    :accountId => 'efaa36f7-d9a0-493f-a3aa-0cb1114eea0c',
    :offset => 0,
    :reportState => 'accounts'
    }

uri.query = URI.encode_www_form(params)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/reports/summary',
    qs: {
        startDate: '2017-01-01T00:00:00.000Z',
        endDate: '2027-01-01T00:00:00.000Z',
        csv: false,
        limit: 50,
        includeSubaccounts: false,
        accountId: 'efaa36f7-d9a0-493f-a3aa-0cb1114eea0c',
        offset: 0,
        reportState: 'accounts'
    },
    headers: {
        Authorization: 'Basic API_KEY'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

{
    "count": 1,
    "rows": [
        {
            "accountType": "master",
            "accountName": "The Master Account",
            "accountNumber": "1234567891",
            "totalAttempts": 400,
            "totalDuration": 123456,
            "totalFailed": 42,
            "totalSuccess": 500,
            "totalPages": 400,
            "totalFaxes": 350
        }
    ]
}

Method: GET

Path: /v1/reports/summary

Returns summary report

Parameters

Parameter Data Type In Description
startDate string query Start date as ISO 8601 string
endDate string query End date as ISO 8601 string
csv boolean query If true - returns result as .csv file
offset integer query Number of pages to return
limit integer query Amount of line items per page that will be returned
reportState string query Accepts accounts and users
includeSubaccounts boolean query Include children to report

Detailed Report

Request:

curl -X GET \
  'https://api.documo.com/v1/reports/detailed?startDate=2017-01-01T00:00:00.000Z&endDate=2027-01-01T00:00:00.000Z&csv=false&limit=50&includeSubaccounts=false&accountId=efaa36f7-d9a0-493f-a3aa-0cb1114eea0c&offset=0&reportState=accounts&status=all&direction=all' \
  -H 'Authorization: Basic {{API_KEY}}'
<?php

$request = new HttpRequest();
$request->setUrl('https://api.documo/v1/reports/detailed');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData(array(
  'startDate' => '2017-01-01T00:00:00.000Z',
  'endDate' => '2027-01-01T00:00:00.000Z',
  'csv' => 'false',
  'limit' => '50',
  'includeSubaccounts' => 'false',
  'accountId' => 'efaa36f7-d9a0-493f-a3aa-0cb1114eea0c',
  'offset' => '0',
  'reportState' => 'accounts',
  'status' => 'all',
  'direction' => 'all'
));

$request->setHeaders(array(
  'Authorization' => 'Basic {{API_KEY}}'
));

  $response = $request->send();
  echo $response->getBody();
import requests

url = "https://api.documo.com/v1/reports/detailed"

querystring = {
    "startDate":"2017-01-01T00:00:00.000Z",
    "endDate":"2027-01-01T00:00:00.000Z",
    "csv":"false",
    "limit":"50",
    "includeSubaccounts":"false",
    "accountId":"efaa36f7-d9a0-493f-a3aa-0cb1114eea0c",
    "offset":"0",
    "reportState":"accounts",
    "status":"all",
    "direction":"all"
    }

headers = {
    'Authorization': "Basic {{API_KEY}}"
    }

requests.get(url, headers=headers, params=querystring)
require 'uri'
require 'net/http'

uri = URI.parse("https://api.documo.com/v1/reports/detailed")

request = Net::HTTP::Get.new(uri)
request["Accept"] = "application/json"
request["Authorization"] = "Basic {{API_KEY}}"

params = {
    :startDate => '2017-01-01T00:00:00.000Z',
    :endDate => '2027-01-01T00:00:00.000Z',
    :csv => false,
    :limit => 50,
    :includeSubaccounts => false,
    :accountId => 'efaa36f7-d9a0-493f-a3aa-0cb1114eea0c',
    :offset => 0,
    :reportState => 'accounts',
    :status => 'all',
    :direction => 'all'
    }

uri.query = URI.encode_www_form(params)

req_options = {
  use_ssl: uri.scheme == "https",
}

response = http.request(request)
puts response.read_body
const request = require("request");

request({
    method: 'GET',
    url: 'https://api.documo.com/v1/reports/detailed',
    qs: {
        startDate: '2017-01-01T00:00:00.000Z',
        endDate: '2027-01-01T00:00:00.000Z',
        csv: false,
        limit: 50,
        includeSubaccounts: false,
        accountId: 'efaa36f7-d9a0-493f-a3aa-0cb1114eea0c',
        offset: 0,
        reportState: 'accounts',
        status: 'all',
        direction: 'all'
    },
    headers: {
        Authorization: 'Basic API_KEY'
    }
}, function (error, response, body) {
    console.log(body);
});

Response:

{
    "count": 335,
    "rows": [
        {
            "messageId": "2171207141356933403",
            "faxNumber": "+1234567891",
            "faxCsid": "mFax",
            "faxCallerId": "1234567891",
            "classificationLabel": "outbound",
            "processingStatusName": "success",
            "createdAt": "2017-12-07T14:13:54.000Z",
            "account_name": "The Master Account",
            "faxAttempt": 1,
            "isSuccess": true,
            "pages": 1,
            "faxResultCode": 0,
            "faxErrorCode": 0,
            "faxDuration": 31332,
            "faxDetected": true,
            "faxEcm": "256",
            "faxSpeed": 33600,
            "faxProtocol": "34",
            "user": {
                "email": "john@doe.com",
                "account": {
                    "isReseller": 1,
                    "accountNumber": "1234567891"
                }
            }
        },
        ...
    ]
}

Method: GET

Path: /v1/reports/detailed

Returns detailed report

Parameters

Parameter Data Type In Description
userId string query Filter by User ID
startDate string query Start date as ISO 8601 string
endDate string query End date as ISO 8601 string
csv boolean query If true - returns result as .csv file
offset integer query Number of pages to return
limit integer query Amount of line items per page that will be returned
status string query Fax status - all, failed, success
direction string query Can be all, inbound, outbound
reportState string query Accepts accounts and users
includeSubaccounts boolean query Include children to report

Errors

The Documo API uses the following error codes:

Error Code Meaning
400 Invalid Input
401 Unauthorized
403 Forbidden
404 Not Found
405 Method Not Allowed
500 Internal Server Error
503 Service Unavailable

You may also find useful How To’s and tips by visiting our Help Center.