# On Prem agents

## List on-prem agents

> Retrieves a collection of agents for a company with a given ID

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"On-prem agents"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["agents:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/agents":{"get":{"tags":["On-prem agents"],"summary":"List on-prem agents","description":"Retrieves a collection of agents for a company with a given ID","parameters":[{"name":"organizationId","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"name":{"type":"string"},"clientSecret":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","STOPPED","NOT_RESPONDING","REGISTERED"]},"alerted":{"type":"boolean"},"connected":{"type":"boolean"},"version":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastConnectionDate":{"type":"string","format":"date-time"},"systemConnectionsCount":{"type":"integer","format":"int32"}}}}}}}}}}}}}}
```

## Get on-prem agent details

> Retrieves an agents for a agent with given ID

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"On-prem agents"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["agents:read"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/agents/{agentId}":{"get":{"tags":["On-prem agents"],"summary":"Get on-prem agent details","description":"Retrieves an agents for a agent with given ID","parameters":[{"name":"organizationId","in":"query","schema":{"type":"integer"}},{"description":"The ID of the agent.","name":"agentId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"name":{"type":"string"},"clientSecret":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","STOPPED","NOT_RESPONDING","REGISTERED"]},"alerted":{"type":"boolean"},"connected":{"type":"boolean"},"version":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastConnectionDate":{"type":"string","format":"date-time"},"systemConnectionsCount":{"type":"integer","format":"int32"}}}}}}}}}}}}}
```

## Create on-prem agent

> Creates a new agent

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"On-prem agents"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["agents:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/agents/{agentId}":{"post":{"tags":["On-prem agents"],"summary":"Create on-prem agent","description":"Creates a new agent","parameters":[{"name":"organizationId","in":"query","schema":{"type":"integer"}},{"description":"The ID of the agent.","name":"agentId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"required":["name"],"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"name":{"type":"string"},"clientSecret":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","STOPPED","NOT_RESPONDING","REGISTERED"]},"alerted":{"type":"boolean"},"connected":{"type":"boolean"},"version":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastConnectionDate":{"type":"string","format":"date-time"},"systemConnectionsCount":{"type":"integer","format":"int32"}}}}}}}}}}}}}
```

## Delete on-prem agent

> Removes an agent with a given ID.

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"On-prem agents"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["agents:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/agents/{agentId}":{"delete":{"tags":["On-prem agents"],"summary":"Delete on-prem agent","description":"Removes an agent with a given ID.","parameters":[{"name":"organizationId","in":"query","schema":{"type":"integer"}},{"description":"The ID of the agent.","name":"agentId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","format":"uuid"}}}}}}}}}}}
```

## Update on-prem agent

> Updates a new agent with given ID

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"On-prem agents"}],"servers":[{"url":"https://eu1.make.com/api/v2","description":"EU1 production zone"},{"url":"https://eu2.make.com/api/v2","description":"EU2 production zone"},{"url":"https://us1.make.com/api/v2","description":"US1 production zone"},{"url":"https://us2.make.com/api/v2","description":"US2 production zone"},{"url":"https://eu1.make.celonis.com/api/v2","description":"Celonis EU1 production zone"},{"url":"https://us1.make.celonis.com/api/v2","description":"Celonis US1 production zone"}],"security":[{"token":["agents:write"]}],"components":{"securitySchemes":{"token":{"type":"apiKey","name":"Authorization","in":"header","description":"Authorize the API call with your API token in the `Authorization` header with the value: `Token your-api-token`.\n\nIf you don't have an API token yet, please refer to the [\"Authentication\" section](/api-documentation/authentication) to learn how to create one.\n"}}},"paths":{"/agents/{agentId}":{"patch":{"tags":["On-prem agents"],"summary":"Update on-prem agent","description":"Updates a new agent with given ID","parameters":[{"name":"organizationId","in":"query","schema":{"type":"integer"}},{"description":"The ID of the agent.","name":"agentId","in":"path","schema":{"type":"string","format":"uuid"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"name":{"type":"string"},"clientSecret":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","STOPPED","NOT_RESPONDING","REGISTERED"]},"alerted":{"type":"boolean"},"connected":{"type":"boolean"},"version":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"lastConnectionDate":{"type":"string","format":"date-time"},"systemConnectionsCount":{"type":"integer","format":"int32"}}}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.make.com/api-documentation/api-reference/on-prem-agents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
