---
title: "Create an Agent Pool"
method: POST
path: "/agent-pools"
tags: ["agent-pools"]
---

# Create an Agent Pool

`POST /agent-pools`

Create a new [agent pool](/docs/agent-pools) resource.

Agent pools can be created at the `account` or `environment` scope. The scope must be
defined as part of the agent pool creation. If a pool is created at the account scope,
all environments and workspaces within those environments will have access to use the pool.
If a pool is created at the environment scope, then only the workspaces in that environment
can use that pool.

The typical flow for configuring a new agent pool involves the following operations:
* Create an agent pool
* [Create an access token](create_agent_pool_token) for the
pool. The pool token is needed by an agent in order to join the agent pool. During the
agent<->server handshake phase, the API server will generate a unique session token for
each agent which will be used for all communication with the API server.
* Install/Configure an agent on the customer's network.

## Query parameters

- `include` string[]

## Response `201`

Successfully created.

## Other responses

- `403` — User unauthorized to perform this action.
- `409` — Quota exceeded error.
- `422` — Malformed request body (missing attributes, wrong types, etc.).
- `4XX` — Client error.
- `5XX` — Server error.

---

[API](https://skmtc.net/scalr/apis/scalr-iacp-api.md) · [All operations](https://skmtc.net/scalr/apis/scalr-iacp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scalr/scalr-iacp-api/revisions/fc927526ad12/schema)
