---
title: Manage Pools
slug: devicepark/sdk-documentation/pools/manage-pools
description: Create and delete pools, and add or remove devices by serial number.
docTags: 
createdAt: 2026-08-10T08:03:44.631Z
---

Use `client.pools()` to create a pool, delete a pool or change which devices belong to it. Pool membership operations identify devices by serial number.

## SDK Methods

| Operation      | Java                                            | Node.js                                               | .NET                                                     | Returns            |
| -------------- | ----------------------------------------------- | ----------------------------------------------------- | -------------------------------------------------------- | ------------------ |
| Create pool    | `client.pools().create(request)`                | `await client.pools().create(request)`                | `await client.Pools.CreateAsync(request)`                | `Pool`             |
| Delete pool    | `client.pools().delete(poolId)`                 | `await client.pools().delete(poolId)`                 | `await client.Pools.DeleteAsync(poolId)`                 | `void`             |
| Add devices    | `client.pools().addDevices(poolId, serials)`    | `await client.pools().addDevices(poolId, serials)`    | `await client.Pools.AddDevicesAsync(poolId, serials)`    | Device serial list |
| Remove devices | `client.pools().removeDevices(poolId, serials)` | `await client.pools().removeDevices(poolId, serials)` | `await client.Pools.RemoveDevicesAsync(poolId, serials)` | Device serial list |

## Create a Pool

`name` is required, must not be blank and must be unique for the authenticated account.

:::CodeblockTabs
```java
CreatePoolRequest request = CreatePoolRequest.builder()
        .name("Android Regression")
        .build();

Pool pool = client.pools().create(request);
System.out.println(pool.id() + " - " + pool.name());
```

```typescript
import { CreatePoolRequestBuilder } from "@device-park/public-sdk";

const request = new CreatePoolRequestBuilder()
  .name("Android Regression")
  .build();

const pool = await client.pools().create(request);
console.log(pool.id, pool.name);
```

```csharp
var request = new CreatePoolRequest.Builder()
    .Name("Android Regression")
    .Build();

var pool = await client.Pools.CreateAsync(request);
Console.WriteLine($"{pool.Id} {pool.Name}");
```
:::

The SDK sends `{ "name": "Android Regression" }` as JSON to `POST /management/api/v1/public/pools` and returns the created `Pool`.

## Add Devices

Pass a non-empty serial list. The endpoint receives each serial as a repeated query parameter and has no request body:

```text
POST /management/api/v1/public/pools/pool-123/devices?serials=SERIAL-1&serials=SERIAL-2
```

:::CodeblockTabs
```java
List<String> serials = Arrays.asList("SERIAL-1", "SERIAL-2");
List<String> devicesInPool = client.pools().addDevices("pool-123", serials);
```

```typescript
const devicesInPool = await client.pools().addDevices(
  "pool-123",
  ["SERIAL-1", "SERIAL-2"]
);
```

```csharp
var devicesInPool = await client.Pools.AddDevicesAsync(
    "pool-123",
    new[] { "SERIAL-1", "SERIAL-2" });
```
:::

The returned list contains the device serials in the pool after the add operation.

## Remove Devices

Removing a device only removes its pool membership. It does not delete the physical device.

```text
DELETE /management/api/v1/public/pools/pool-123/devices?serials=SERIAL-1
```

:::CodeblockTabs
```java
List<String> remainingSerials = client.pools().removeDevices(
        "pool-123",
        Collections.singletonList("SERIAL-1")
);
```

```typescript
const remainingSerials = await client.pools().removeDevices(
  "pool-123",
  ["SERIAL-1"]
);
```

```csharp
var remainingSerials = await client.Pools.RemoveDevicesAsync(
    "pool-123",
    new[] { "SERIAL-1" });
```
:::

The returned list contains the serials remaining in the pool.

## Delete a Pool

:::CodeblockTabs
```java
client.pools().delete("pool-123");
```

```typescript
await client.pools().delete("pool-123");
```

```csharp
await client.Pools.DeleteAsync("pool-123");
```
:::

Deleting a pool does not delete its devices. The devices return to the available inventory and the deleted pool id must no longer be used as `devicePoolId`.

## Validation and Errors

- `create(...)` rejects a missing or blank name before sending the request.
- `delete(...)`, `addDevices(...)` and `removeDevices(...)` reject a missing or blank `poolId`.
- Membership methods reject a `null` or empty serial list.
- Device Park reports duplicate names, unknown pools, unknown serials and authorization failures through its normal HTTP error response.

## Next Steps

- [List and filter pools](docId\:fmKLq2CPwGu4aurSboUFg)
- [Inspect all pool models](docId:6rgeXT-fvPXowF0_lRTJj)
- [Allocate from a pool](docId\:sPz_N5rutGOmDKrBjbb0L)
