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. 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.
  4. 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

UID Access (preferable)

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

{
"UID":"1423e214d153d123123"
}

Department ID Access

To access a Department’s data via the API, use Web API (with access to department’s data) Unique Identifier as the “UID” parameter and send an authentication request using the following Post content sample:

{ 
"UID" : "4821737B71224A087641585F80BF8",
"Action": 1
}

In this case, the system will response with the list of available Departments IDs.

{
    "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 Web API UID to create an authentication request to the Department. Use the following sample:

{ 
"UID" : "4821737B71B22A087641585F80BF8"
 "Id" : "19357"
}

Legacy Username and Password (not recommended, may require Account ID)

{
"username":"username",
"password":"password"
}

Success Response

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