# Platform sets

Source: https://ampost.io/docs/platform-sets · Full reference: https://ampost.io/llms-full.txt

## Platform Sets

A platform set groups connected accounts, at most one per platform. You can have up to 20 sets. Deleting a set revokes its accounts and keeps its disconnected accounts and posts without a set; a reconnect puts an account in the set you connect it to. Your last set cannot be deleted.

### List platform sets

`GET /api/platform-sets` · MCP tool `platform_sets_list` · scope `accounts:read` · rate limit `apiRead` · success `200`

List your platform sets, default set first: each with its `id`, `name`, `isDefault` and `accountCount`. A platform set groups at most one account per platform (for example one brand's Instagram, LinkedIn and X); posts, queues and connections target a set by `id`. Use this to find a set's id or to pick a set with the user; use platform_sets_get to re-read one set whose id you have, and accounts_list with `platformSetId` for the accounts in a set. `accountCount` counts only active accounts, the same ones accounts_list returns by default; revoked accounts are not counted. Paginated with `limit` and `offset`. A key restricted to some sets sees only those.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `limit` | query | integer | no | Page size, 1-100. Default 20. |
| `offset` | query | integer | no | Number of items to skip. Default 0. |

Example response:

```json
{
  "data": [
    {
      "id": "9a2c4e6b-1d3f-4a5c-8e7b-2f4d6a8c0e10",
      "name": "default",
      "isDefault": true,
      "accountCount": 3,
      "createdAt": "2026-10-01T08:00:00.000Z",
      "updatedAt": "2026-10-01T08:00:00.000Z"
    },
    {
      "id": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
      "name": "Client A",
      "isDefault": false,
      "accountCount": 2,
      "createdAt": "2026-10-06T09:00:00.000Z",
      "updatedAt": "2026-10-06T09:00:00.000Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total": 2,
    "hasMore": false
  }
}
```

### Create a platform set

`POST /api/platform-sets` · MCP tool `platform_sets_create` · scope `accounts:write` · rate limit `createPost` · success `201`

Create an empty platform set with this name and return it. Add accounts to it with accounts_connect and its `platformSetId`; to rename a set, use platform_sets_update. You can have at most 20 sets (409 PLATFORM_SET_LIMIT_REACHED). A key restricted to some sets cannot create one (403 PLATFORM_SET_NOT_ALLOWED).

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `name` | body | string | yes | Set name, 1-50 characters |
| `Idempotency-Key` (MCP `idempotencyKey`) | header | string | no | Idempotency key (1-255 visible ASCII characters, for example a UUID). A retry with the same key and arguments within 24 hours returns the first result instead of running again. Send a new key for each new action. See Idempotency. |

Example request:

```json
{
  "name": "Client A"
}
```

Example response:

```json
{
  "id": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "name": "Client A",
  "isDefault": false,
  "accountCount": 2,
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-06T09:00:00.000Z"
}
```

### Get a platform set

`GET /api/platform-sets/{platformSetId}` · MCP tool `platform_sets_get` · scope `accounts:read` · rate limit `apiRead` · success `200`

Get one platform set by id: `name`, `isDefault`, `accountCount` (active accounts only; revoked ones are not counted) and its timestamps. Use it when you have the id, for example to check a set still exists or its account count before posting to it; use platform_sets_list to find a set or see all of them, and accounts_list with `platformSetId` for the accounts themselves. 404 PLATFORM_SET_NOT_FOUND when no set with this id is yours or the key is restricted to other sets.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `platformSetId` | path | string | yes | Platform set id (UUID): `id` from platform_sets_list |

Example response:

```json
{
  "id": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "name": "Client A",
  "isDefault": false,
  "accountCount": 2,
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-06T09:00:00.000Z"
}
```

### Rename a platform set

`PATCH /api/platform-sets/{platformSetId}` · MCP tool `platform_sets_update` · scope `accounts:write` · rate limit `createPost` · success `200`

Rename a platform set, including the default set, and return it. Only the name changes: accounts, posts and the queue stay. 404 PLATFORM_SET_NOT_FOUND for an unknown id; 403 PLATFORM_SET_NOT_ALLOWED for a set the key is restricted from.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `platformSetId` | path | string | yes | Platform set id (UUID): `id` from platform_sets_list |
| `name` | body | string | yes | Set name, 1-50 characters |

Example request:

```json
{
  "name": "Client A"
}
```

Example response:

```json
{
  "id": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "name": "Client A",
  "isDefault": false,
  "accountCount": 2,
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-06T09:00:00.000Z"
}
```

### Delete a platform set

`DELETE /api/platform-sets/{platformSetId}` · MCP tool `platform_sets_delete` · scope `accounts:write` · rate limit `createPost` · success `200`

Delete a platform set and revoke its active accounts. Its disconnected accounts and its posts are kept without a set; reconnect an account with accounts_connect and its accountId to put it in another set. Your last remaining set cannot be deleted (409 LAST_PLATFORM_SET). 409 PLATFORM_SET_IN_USE means an account was connected to the set during the delete: retry.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `platformSetId` | path | string | yes | Platform set id (UUID): `id` from platform_sets_list |

Example response:

```json
{
  "id": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "deleted": true
}
```
