# Agents

## List 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":"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":["Agents"],"summary":"List 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 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":"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":["Agents"],"summary":"Get 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 agent

> Creates a new agent

```json
{"openapi":"3.0.0","info":{"title":"Web API v2 - Public ","version":"1.0.0"},"tags":[{"name":"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":["Agents"],"summary":"Create 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 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":"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":["Agents"],"summary":"Delete 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 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":"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":["Agents"],"summary":"Update 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"}}}}}}}}}}}}}
```
