Adding Integration Unique Identifier

To set up an integration with Dotcom-Monitor you must have access to an active Dotcom-Monitor account and create a Web API Unique Identifier to use in the authentication request:

  1. Log in to the Dotcom-Monitor account.
  2. In Dotcom-Monitor, create an integration UID under Configure Integrations > Add Integration > Web API.
  3. Whitelist IPs as described in the How to Whitelist IPs for Web API Access article of our wiki.
  4. Optional: If the master account contains Departments and you want to access and send requests to the API of a specific Department, in the Add Integration window, select Allow access to department’s data.
  5. Click Create Integration and copy the Web API Unique Identifier from the Integration UIDs list to clipboard (Web API (with access to department’s data) in the case of Department access).

Authentication

Request URL

POST https://api.dotcom-monitor.com/config_api_v1/login

When you login to your account via the “/login” call, a new client session begins. Sessions expire automatically after a predetermined length of inactivity. The default is 1 minute. If you make an API call, the inactivity timer is reset to zero.
When your session expires, the exception HTTP error code “401 – Unauthorized” is returned. If this happens, you must re-login again.

After authorization, client is being identified by cookie, so make sure cookies are enabled.

POST Content

Use Web API Unique Identifier as the UID parameter value (Configure Integrations > Add Integration > Web API).

{
"UID":"1423e214d153d123123"
}

Department ID Access

To access Department’s data via the API, you need to create a Web API (with access to department’s data) integration. Use the corresponding Unique Identifier as the UID parameter in conjunction with the “Action” : 1 name/value pair in the authentication request.

Use the following Post content sample:

{ 
"UID" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"Action": 1
}

The system will response with the list of available Departments Ids. See the example JSON below.

{
    "Success": true,
    "Result": [
        {
            "Name": "my_org",
            "HasCompany": true,
            "HasDepartment": true,
            "Qantity": 2,
            "Accounts": [
                {
                    "Id": 15530,
                    "Name": "my_org",
                    "CompanyName": "my company",
                    "Email": "email@gmail.com",
                    "Owner": true,
                    "Department": false,
                    "New": false
                },
                {
                    "Id": 19357,
                    "Name": "Admin",
                    "CompanyName": "my company",
                    "Email": "email111@gmail.com",
                    "Owner": true,
                    "Department": true,
                    "New": false
                }
            ]
        }
    ]
}

Copy the Id of the Department you want to log in and use it in conjunction with the UID to create an authentication request to the Department.

Use the Post sample provided below.

{ 
"UID" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
 "Id" : "XXXX"
}

Where “UID”:”XXXXX….XXX” is your Web API (with access to department’s data) UID  and “Id”: “XXXX” is your Department Id.

Success Response

{
"Success":true,
"Result":"OK"
}