Getting Started with ThreatLocker PortalAPIs

10 min. readlast update: 07.16.2026

This article serves as an introductory guide for setting up and using ThreatLocker PortalAPI endpoints. This article is designed for ThreatLocker Administrators that have some experience working with APIs already and are looking to maximize what they can do through automation and/or without having to access the ThreatLocker Portal directly.

 

Table of Contents

Prerequisities

Instance

Authentication

ManagedOrganizationId

Permissioning

Sample GET Request

Sample POST Request

Common Errors/Troubleshooting

 

Prerequisities

  • Locate the instance where your organization exists. See the Instance section below for more information on getting your organization's instance.
  • At least one valid ThreatLocker API User token with at least one User Role applied. Linked below is more information on creating API Users:

API Users | ThreatLocker Help Center

  • Identify the organization(s) you'll be calling the ThreatLocker PortalAPI for, and have their IDs ready to use in the managedOrganizationId header. See the ManagedOrganizationId section below for more information.
  • Postman/Talend/Any agent that can be used to call PortalAPI endpoints. Throughout this article, only Postman will be used.
  • Basic knowledge of ThreatLocker products, permissions, and the functionalities/actions that can be taken both from the Portal and on the Agent using ThreatLocker.

 

Instance

In the PortalAPI Documentation articles, each PortalAPI endpoint will have its URL listed directly below its name, as shown in the screenshot below. Replace the "INSTANCE" text with the instance letter found following the instructions below.

In the examples listed throughout this article, all PortalAPI calls are made to an organization on instance "B", as shown by "...portalapi.B.threatlocker.com...". Unless your organization is on instance "B", replace "B" in all your PortalAPI calls with the instance letter for the instance where your organization exists. Linked below is more information on locating your organization's instance:

Locating Your Organization's Instance | ThreatLocker Help Center

 

Authentication

For each call, the ThreatLocker PortalAPI expects the API User's authentication token to be appended to the header of each request. The token should be set up with an auth type of "API Key". The key name should always be "Authorization", and the value should always be the valid API User token. Shown below is how to do this in Postman in the Authorization tab.

In the examples throughout this article, the authentication token is configured in the Authorization tab so that it will be automatically appended to the request header when the request is sent. However, you can also manually append this token to the header of each request, as shown below.

 

ManagedOrganizationId

In addition to appending the Authorization token to each request header, the PortalAPI also expects the organizationId to which it will create, read, update, or delete organization data. To get the organizationId values, navigate to the Manage icon and select the Organizations page from the pop-out menu in the ThreatLocker Portal. From there, select the settings icon in the Actions column to open the organization sidebar, and copy/save the GUID below the "Organization ID" heading.

For each PortalAPI request, append a header named "managedOrganizationId" with the desired organizationId in the value field, as shown below. This header can change where the data is created, returned, modified, or deleted, and using the wrong organizationId may cause the call to fail. Think of it as selecting a different organization in the ThreatLocker Portal when changing the managedOrganizationId header value.

 

Permissioning

The permissions required to call each PortalAPI endpoint are listed in the Permission Requirements section below each endpoint in the respective PortalAPI Documentation article. Ensure that permissions are assigned to the User Role corresponding to the API User being used, and that the role has only the permissions needed to call the desired endpoints, thereby applying the principle of Zero Trust to your API User.

It is important to pay attention to how the Permission Requirements section is structured in each article, as some endpoints require one of the following permissions, while others require a specific combination of permissions, as shown in the two screenshots below.

 

Sample GET Request

For this example, the ThreatLocker PortalAPI endpoint ApplicationGetResearchDetailsById will be called. Full documentation for this endpoint is available here:

ApplicationGetResearchDetailsById

For this endpoint, the managedOrganizationId can be set to any valid organizationId that the API User has access to. As per the documentation listed, any one of the following permissions is required. For this example, just the "View Application Control Applications" permission has been assigned to the API User.

  • Approve for Entire Organization
  • Approve for Entire Organization (Hash Only)
  • Approve for Group
  • Approve for Group (Hash Only)
  • Approve for Single Computer
  • Approve for Single Computer (Application Only)
  • Approve for Single Computer (Hash Only)
  • Edit Application Control Applications
  • View Application Control Applications
  • View Approvals

As per the documentation listed above, this endpoint requires the applicationId parameter with a valid GUID (applicationId) entered into the value field. For this example, the applicationId GUID corresponds to the Windows ThreatLocker Built-In application for Adobe Acrobat and is listed in the Request URL dropdown below.

Request URL

/portalapi/Application/ApplicationGetResearchDetailsById?applicationId=4cc1729d-8727-43de-b379-f3df4fe6055a

If the call is successful using the applicationId above, the following response body in the dropdown below will be returned.

Response body
{
    "researchApplicationId": "6c9b00c3-20d5-42b3-b44a-8c2e186e208a",
    "productName": "Adobe Acrobat",
    "clientApplicationName": "Adobe Acrobat (Built-In)",
    "productDescription": "Adobe Acrobat is used to view, create, print, and manage PDF (Portable Document Format) files.",
    "clientDescription": "",
    "osType": 1,
    "remediationText": "Evaluate the need for this software. If it is required for business use, limit access to high-risk applications, files, and the ability to reach out to the internet.",
    "potentialRiskStrategyText": "Vulnerabilities may result in unauthorized access to sensitive documents, leading to potential data breaches, intellectual property theft, or manipulation of critical documents.",
    "reviewRating": 4,
    "concernRating": 3,
    "businessRating": 6,
    "countriesWhereCodeCompiled": [
        {
            "name": "United States",
            "code": "US",
            "tooltip": "Company Influence: United States"
        },
        {
            "name": "India",
            "code": "IN",
            "tooltip": "Development Influence: India"
        }
    ],
    "categories": [
        "PDF Software"
    ],
    "accessLevels": [
        {
            "displayName": "Applications",
            "value": "RF applications",
            "isProtected": true,
            "orderBy": 1
        },
        {
            "displayName": "File",
            "value": "RF File Access",
            "isProtected": false,
            "orderBy": 2
        },
        {
            "displayName": "Internet",
            "value": "RF Internet",
            "isProtected": false,
            "orderBy": 3
        },
        {
            "displayName": "Registry",
            "value": "RF Registry",
            "isProtected": false,
            "orderBy": 4
        }
    ]
}

 

Sample POST Request

For this example, the ThreatLocker PortalAPI endpoint ComputerGroupGetByParameters will be called. The PortalAPI Documentation articles break down POST requests into the required versus optional fields. Only the required fields/body are needed to successfully call the endpoint. However, look for additional notes on limited functionality or potential unintended behavior when fields are omitted. Full documentation for the endpoint used in this example is available here:

ComputerGroupGetByParameters

For this endpoint, the managedOrganizationId can be set to any valid organizationId that the API User has access to. Remember that when changing the managedOrganizationId, the results returned by the PortalAPI will appear as if you are navigating to different organizations' Computer Groups pages in the ThreatLocker Portal.

As per the documentation listed, any one of the following permissions is required. For this example, just the "View Computer Groups" permission has been assigned to the API User.

  • Edit Computer Groups
  • Install Computers
  • View Computer Groups

As per the documentation above, this endpoint requires, at a minimum, the following JSON body in the PortalAPI request.

Required JSON body template
{
    "pageNumber": <Integer>,
    "pageSize": <Integer>
}

For this example, the following JSON body, including all optional fields, will be used.

Full JSON body template

{
    "osType": <Integer>,
    "pageNumber": <Integer>,
    "pageSize": <Integer>,
    "searchText": "<String>",
    "showAllGroups": <Boolean>
}

Full JSON body example
{
    "osType": 1,
    "pageNumber": 1,
    "pageSize": 25,
    "searchText": "",
    "showAllGroups": false
}

If the call is successful using one of the JSON bodies above, the following JSON response body in the dropdown below will be returned. 3 computer groups were returned for this example. Note: Sensitive values have been removed and replaced with placeholders, noted with <> characters around them, and 0 values. You can expect these values to contain valid data when returned from the PortalAPI.

JSON response body
[
    {
        "computerGroupId": "00000000-0000-0000-0000-000000000000",
        "computerCount": 0,
        "dateCreated": "<String>",
        "installKey": "<String>",
        "name": "<String>",
        "number": <Integer>,
        "organizationId": "00000000-0000-0000-0000-000000000000",
        "orgName": "<String>",
        "osType": 1,
        "threatLockerVersionDescription": "<String>",
        "threatLockerVersionId": "00000000-0000-0000-0000-000000000000",
        "totalRows": <Integer>,
        "updateChannel": <Integer>,
        "tlUpdateChannel": "<String>",
        "osTypeProjected": 0,
        "windowsName": null,
        "macName": null,
        "isUpdatable": false,
        "threatLockerLastVersionDescription": "<String>",
        "isLastVersion": false
    },
    {
        "computerGroupId": "00000000-0000-0000-0000-000000000000",
        "computerCount": 0,
        "dateCreated": "<String>",
        "installKey": "<String>",
        "name": "<String>",
        "number": <Integer>,
        "organizationId": "00000000-0000-0000-0000-000000000000",
        "orgName": "<String>",
        "osType": 1,
        "threatLockerVersionDescription": "<String>",
        "threatLockerVersionId": "00000000-0000-0000-0000-000000000000",
        "totalRows": <Integer>,
        "updateChannel": <Integer>,
        "tlUpdateChannel": "<String>",
        "osTypeProjected": 0,
        "windowsName": null,
        "macName": null,
        "isUpdatable": false,
        "threatLockerLastVersionDescription": "<String>",
        "isLastVersion": false
    },
    {
        "computerGroupId": "00000000-0000-0000-0000-000000000000",
        "computerCount": 0,
        "dateCreated": "<String>",
        "installKey": "<String>",
        "name": "<String>",
        "number": <Integer>,
        "organizationId": "00000000-0000-0000-0000-000000000000",
        "orgName": "<String>",
        "osType": 1,
        "threatLockerVersionDescription": "<String>",
        "threatLockerVersionId": "00000000-0000-0000-0000-000000000000",
        "totalRows": <Integer>,
        "updateChannel": <Integer>,
        "tlUpdateChannel": "<String>",
        "osTypeProjected": 0,
        "windowsName": null,
        "macName": null,
        "isUpdatable": false,
        "threatLockerLastVersionDescription": "<String>",
        "isLastVersion": false
    }
]

 

Common Errors/Troubleshooting

Code Description Troubleshooting
200 Success N/A
203 Non-Authoritative Information N/A (Action completed)
400 Bad Request
  • Check that all required fields are present in the request body
  • Verify JSON is well-formed (no trailing commas, matching brackets, etc.)
  • Confirm parameter types match expectations (string vs. integer, correct date format, etc.)
  • Review the response body for a specific error message, indicating which field failed validation
401 Unauthorized
  • Check that the permissions assigned to the API User correspond to the PortalAPI endpoint being called
403 Forbidden
  • Confirm the API User token is included in the request header with the correct name (Authorization) and format
  • Check that the instance letter used in the PortalAPI URL path corresponds to your organization
  • Verify the API User token hasn't expired or been revoked
  • Check for typos or truncation in the API User token
500 Internal Server Error
  • Retry the request after a short delay, as this may be transient
  • Check the ThreatLocker status page for any ongoing incidents
  • If the error persists, capture the request details, PortalAPI endpoint, and timestamps, and contact ThreatLocker Support
Was this article helpful?