Getting started with the IT Glue API

For partners subscribed to the current Enterprise plan.

The IT Glue API is a powerful tool for automation and getting data from external sources into your IT Glue account. It also provides a direct, machine-friendly way of accessing your data, so that you can pull it into your own applications or integrate with third-party tools that we don't currently integrate with.

This article walks you through the process of creating "hello world" code so that you get some practice making calls to our API. 

You'll also learn about the Flexible Assets API. The information presented will be very helpful to users who want to bypass the web app to create flexible asset data in their account.

For example, you can create and run a PowerShell script to push domain controller information from Active Directory to populate flexible asset records in IT Glue. PowerShell is a tool that anyone performing Windows system administration tasks is probably familiar with, but you can use any programming language that supports the creation of HTTPS requests and that can parse JSON, which includes most modern programming languages.

Let's get started!

By the end of this article, you'll know how to:

  • Generate an API key from IT Glue
  • Locate a new organization's object ID using a GET request
  • Use a parameter in the GET request to sort the output by a specific field like the object ID
  • Locate a new flexible asset type's object ID and field name-keys using GET requests
  • Use the requested data to POST (create) new flexible assets

Programmatically accessing data and making requests 

If you're an Administrator on your account, and you have some programming experience, you’ve got everything you need to start making requests and accessing your data. You need your Administrator credentials to generate an API key.

Base URL

REST APIs have a base URL to which the endpoint paths are appended. The developer documentation for each endpoint shows the parameters that can be appended to the base URL to form a request (or sent as the body of the request). The base URL for all endpoints and methods is: EU partners will use

The following is an example of the form of a request URL:

which is composed of the following parts:

  • Base URL:
  • Path:  /organizations
  • Query parameter:  sort=id

Some things to note:

  • All API access must use HTTPS.
  • Data is sent and received as JSON.
  • Dates are in UTC timezone and in the following format: yyyy-mm-dd (e.g. 2016-03-31).
  • By default, you get a paginated set of objects (50 per page is the default). If you're making requests and receiving an incomplete set of results, you're probably only seeing the first page. You'll need to request the remaining pages in order to get more results.
  • HTTP response codes are used to indicate errors. The developer documentation provides more information, including details about the kinds of errors each API call might result in and what could cause such errors.

Flexible asset resources

In the IT Glue API, there are three flexible asset resources that you can interact with: 

  • Flexible Asset Type - an object that defines the data structure of flexible assets as a table containing one or more child field objects with defined field specifications. There are multiple types of fields for different kinds of inputs — such as string, text, date, and number. 
  • Flexible Asset Field - a child object to a parent flexible asset type. This object exists to allow you to interact directly with the individual fields of a flexible asset type. 
  • Flexible Asset - an object created from the data structure pre-defined by a flexible asset type.

Step 1: Creating a test environment

We recommend setting up a test environment in your account. Because you're accessing the API in production, you'll want to keep your API tests confined to a handful of test organizations.

  1. From IT Glue, create one or more new organizations.
  2. Take note of the name of each test organization. You'll need the names to find the organization IDs further below.

Note: PSA syncing can be temporarily disabled by clicking Account > Integrations and then Actions > Pause Sync. The change takes effect after any running sync jobs complete. After that's done, any data you create in IT Glue to test the API won't accidentally push to your PSA. Remember to delete the test organizations before restarting the sync.

Step 2: Generating an API key

All API endpoints require authentication using a private API key. You can generate one or more API keys for your account. The ability to generate multiple keys means you can use different keys for different integrations. 


To generate a new API key:

  1. Users with an Administrator role can generate the API key by visiting their Account > Settings in IT Glue.
  2. Under the API Keys > Custom API Keys, give the key a name and then generate it. Note that you can't view a key again after it has been generated. 
  3. For security, an optional Password Access setting is provided for each API key. Password values can be accessed from the Passwords API only if this setting is enabled. Be careful with this feature. 
Important: Whenever you send a request to the API, you send your key with it so that we know it's you. This means that anyone who has your key can access your data, so it’s important to keep the key safe. You can revoke an old API key and generate a new one at any time from your IT Glue account. Any requests made using your old key will no longer work. 

Step 3: Get your organization ID

Now you can start building the first request. The most important part is setting the authorization header to provide the API key.

This first call is a GET request that gives you a list of all organizations, in the reverse order they were created. The list includes the organization name, the object ID, and other details. Locate the ID of one of your test organizations. Write this number down. You'll need it in step 7.


Remember to include your API key with each call to the API.

GET /organizations?sort=-id HTTP/1.1 
Content-Type: application/vnd.api+json
x-api-key: ITG.**************************

Step 4: Create a new flexible asset type

Open your IT Glue account and create a new flexible asset type. Let's create a very simple flexible asset type called "API Email Example" and give it six fields: a Type field, two Tag fields, two Select (drop-down) fields, and a Text field for a URL:

Name: Domains
Kind: Tag
Hint: Tag accepted domains for this email system
Type: Domains
Checkboxes: Required, Show in list

Name: Type
Kind: Select
Hint: Select the email platform
Options: Office 365, Exchange 2016, Exchange 2013, POP/IMAP
Checkboxes: Required, Use for title, Show in list 

Name: Email Servers
Kind: Tag
Hint: Tag server(s) participating in email delivery
Type: Configurations
Checkboxes: Show in list

Name: Location
Kind: Select
Hint: Where is the email hosted
Options: Cloud, On-Premises

Name: Inbound Delivery
Kind: Select
Hint: How is inbound email delivered
Options: Office 365, Google, Proofpoint, Mimecast, Reflexion
Checkboxes: Show in list

Name: Webmail URL 
Kind: Text
Checkboxes: Show in list

Note that, in this example, the only required fields are the first and second fields.

Flexible asset types may contain any number and combination of fields. To decide which field types to use, refer to the table below. For more information, see Flexible asset field definitions.

Popular field types

Option Description


A true/false field. The checkbox is ticked when the value is set to true.


A date field. 


A number field.


A field that provides a set of values in a drop-down menu.


A field that allows one or more assets to be tagged. 


A short text field for adding a small amount of text.


A multi-line text field for adding a large body of text.

Step 5: Use a GET request to locate the flexible asset type ID 

After you create a new flexible asset type in your account, send another GET request to get the JSON object ID of your new flexible asset type. When you make this call, you receive a list of all flexible asset types in the reverse order they were created. Locate the ID of your newly created flexible asset type. Write this number down. You'll need it in step 7.


Remember to include your API key with each call to the API.

GET /flexible_asset_types?sort=-id HTTP/1.1
x-api-key: ITG.**************************
Content-Type: application/vnd.api+json

Step 6: Use a GET request to view the JSON object 

This next call sends the request to the GET /flexible_asset_types endpoint with the JSON object ID and the flexible_asset_fields parameter included. You need the JSON object details (name-keys for each field) from the response body to complete the next step. Copy and paste the information to where you can refer to it.


Remember to include your API key with each call to the API.

GET /flexible_asset_types/33?include=flexible_asset_fields HTTP/1.1 
x-api-key: ITG.**************************
Content-Type: application/vnd.api+json

Step 7: Create a flexible asset 

Finally, let's create a flexible asset using the flexible asset type you created above.

When creating your flexible asset, pass the values as a JSON object that has defined "traits". Traits are key-value pairs, for example, {"name-key1": 1, "name-key2": 2}, and are used to create your flexible asset data. View your flexible asset type to identify the name-key for each field you want to populate as well as any fields that may be required. 

A flexible asset can be tagged with associated organizations, configurations, contacts, etc., which are all separate JSON objects. When creating the trait values, you need to enter the JSON object IDs of the assets being tagged. You can use the API to make additional calls to get the object IDs. However, after you create an asset in your account, IT Glue gives it a URL that references the asset's object ID. If you need a quick way to find an asset's object ID, view the asset in IT Glue and locate the object ID in the URL. 

Now, construct a POST request, like so:


Remember to include your API key with each call to the API.

POST /flexible_assets HTTP/1.1 
x-api-key: ITG.**************************
Content-Type: application/vnd.api+json

  "data": {
    "type": "flexible-assets",
    "attributes": {
      "organization-id": 2,
      "flexible-asset-type-id": 33,
      "traits": {
        "domains": 789,
        "type": "Office 365",
        "email-servers": 457,
        "location": "Cloud",
        "select": "Office 365",
        "webmail-url": "" 

This makes a request to the POST /flexible_assets endpoint that conforms to the field specification of the flexible asset type you created earlier. The new flexible asset is associated with the organization ID and flexible asset type ID you specified in the request. The response returns the created flexible asset if successful.  

JSON Trait Examples

Trait values must be a valid data type (string, number, array, boolean, or null). Use the following table as a reference when determining what kind of data type to enter.

Field Name JSON


Client has signed and acknowledged MSA

{"client-has-signed-and-acknowledged-msa": true}

Signing Date 

{"signing-date": "2018-10-31"}


Number of seats

{"number-of-seats": 25}


Field Technician

{"field-technician": "Randy Rios"}


Emergency Contact

To pass a single tag

{"emergency-contact": 4387}

To pass multiple tags

{"emergency-contact": [4387, 3901, 7891]}


Emergency Contact Telephone Number

{"emergency-contact-telephone-number": "555-234-9876"}



{"notes": "These are the notes."}

Next steps

We hope this article has given you the answers to some basic questions and started you thinking about new ways to use flexible assets. Once you realize how flexible assets can provide the means for storing any kind of data, the possibilities really start to open up.

Learn even more about working with the API in the developer docs and the Flexible Asset API in the IT Glue Community.

Note: Thanks to community member Caleb Albers there is now a PowerShell API wrapper and a place to share information about automating documentation on GitHub at This collection of tools and code samples was designed to give developers the means to script and automate their Active Directory and IT infrastructure documentation.
Was this article helpful?
4 out of 5 found this helpful