> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incredibuild.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent ID API

Last updated on Nov 23, 2026

This feature is only available in Incredibuild's [Enterprise Plan](https://docs.incredibuild.com/windows/pricing-plans.md).

The Agent ID is an ID that an administrator gives an agent on the Coordinator, for example to match agent usage to a cost center, team or asset tag. The Coordinator Manager shows it as **Agent ID**. In the API its field name is `customAgentId`.

The Agent ID is not the agent name. The agent name still identifies the agent in every API call, including the calls on this page.

This API lets you:

* **Get Agents** - read agent details, including each agent's Agent ID.
* **Set Agent ID** - set, change or clear the Agent ID of one or more agents.

Every API call must include a header with a key called **client-api-key** and the value of your [API key](https://docs.incredibuild.com/windows/api-keys.md). Set Agent ID needs an API key with the Group Manager role. All APIs are case sensitive.

## Support Matrix

| Agent ID API Version | Required version of Incredibuild for Windows |
| - | - |
| 1.6.0 | 10.40.0 |

The following are descriptions of items in the API's calls below:

* **Coordinator IP Address/Hostname** – the IP address or hostname of the Coordinator.

* **Coordinator UI Port** – the port number of the Coordinator Manager. By default, this is 8000.

* **Version** - use `1.6.0`. Get Agents with an older version, or with no version, returns the older response, which has no `customAgentId`. Set Agent ID with a version older than 1.6.0 returns "API not implemented".

* **Coordinator ID** - The ID assigned by Incredibuild to your Coordinator. You can view this in the **Coordinator Manager** > **Settings** > **API Access** area.

  ![](https://mintcdn.com/incredibuild-docs-migrated/ZOEqdwyRwGqk-nbn/images/windows/_shared/windows/api_key_coord_id.png?fit=max\&auto=format\&n=ZOEqdwyRwGqk-nbn\&q=85\&s=f4fde6b5d82e6cd61ff79e5741d84367)

## Get Agents

Returns details of the requested agents. Repeat the `agents` parameter once per agent.

**Request Syntax**

```
GET https://{Coordinator IP Address/Hostname}:{Coordinator UI Port}/api/agents?coordinatorId={coordinatorId}&version=1.6.0&agents={agent name}&agents={agent name}
```

**Example Request:**

```
GET https://coordinator.example.com:8000/api/agents?coordinatorId=1234abcd&version=1.6.0&agents=BUILD-01&agents=BUILD-02&agents=BUILD-03
```

**Example Response:**

```json theme={null}
{
  "agentsInRequest": 3,
  "agentsInResults": 2,
  "agentsNotFound": 1,
  "agentsDetails": [
    {
      "name": "BUILD-01",
      "id": "BUILD-01",
      "buildGroup": "Default",
      "ip": "10.0.0.11",
      "status": "Ready",
      "registeredHelperCores": 16,
      "customAgentId": "CC-1042"
    },
    {
      "name": "BUILD-02",
      "id": "BUILD-02",
      "buildGroup": "Default",
      "ip": "10.0.0.12",
      "status": "Ready",
      "registeredHelperCores": 8,
      "customAgentId": null
    }
  ]
}
```

Where:

* `agentsInRequest` - the number of agents requested.
* `agentsInResults` - the number of requested agents that were found.
* `agentsNotFound` - the number of requested agents that were not found. Agents that are not found are left out of `agentsDetails`.
* `name` and `id` - the agent name.
* `customAgentId` - the agent's Agent ID, or `null` if it has none.

## Set Agent ID

Sets the same Agent ID on every listed agent. All the agents are sent to the Coordinator in one request, and the response has one result per agent.

**Request Syntax**

```
POST https://{Coordinator IP Address/Hostname}:{Coordinator UI Port}/api/agents/setCustomAgentId?coordinatorId={coordinatorId}&version=1.6.0
```

**Body Syntax**

```
{
  "customAgentId": "{Agent ID}" | null,
  "agents": ["{agent name}", ...]
}
```

* `customAgentId` (required) - the new Agent ID. Send `""` or `null` to clear it. The Coordinator removes spaces at the start and end. It can be up to 64 characters and cannot contain control characters such as tabs or line breaks.
* `agents` (required) - the names of the agents, at least one.

When **Require a unique Agent ID** is on (the default; **Coordinator Manager** > **Settings** > **Agents**), an Agent ID can be used by only one agent, and the check ignores case. Agents that are offline still hold their Agent ID. So when you send one Agent ID for several agents, only the first agent gets it and the others fail. To give each agent its own Agent ID, make one call per agent.

**Example Body:**

```json theme={null}
{
  "customAgentId": "CC-1042",
  "agents": ["BUILD-01", "BUILD-02"]
}
```

**Example Request:**

```
POST https://coordinator.example.com:8000/api/agents/setCustomAgentId?coordinatorId=1234abcd&version=1.6.0
```

**Example Response:**

```json theme={null}
[
  { "agentName": "BUILD-01", "status": "OK" },
  { "agentName": "BUILD-02", "status": "fail", "message": "CustomAgentId \"CC-1042\" is already used by agent BUILD-01" }
]
```

An agent with `"status": "fail"` is not changed, and `message` says why:

* `Agent not found` - no agent with that name.
* `CustomAgentId "..." is already used by agent ...` - the Agent ID is taken and **Require a unique Agent ID** is on.
* `Coordinator is not primary` - the call reached a backup Coordinator. Agent IDs can be changed only on the primary Coordinator.

**Errors**

* **400** - the body is not valid: `customAgentId` is missing, is not a string or `null`, is longer than 64 characters (not counting spaces at the start and end), or contains a control character; or `agents` is missing or empty. Nothing is changed.
* **501** - "API not implemented": the version is older than 1.6.0.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.