# set_account_groups

> Put an account in groups with Wavegrain's MCP server: the set_account_groups tool needs the write permission. Inputs, outputs and an example call.

> Index of these docs: https://wavegrain.com/developers/llms.txt

**Put an account in groups.** Permission: `write`. Changes or removes saved work.

Set a connected account's groups: groupIds replaces them, addGroupIds adds. A group holds one account per network. An approved post whose accounts change goes back to draft until the owner approves it again (approvalsWithdrawn); tell the user.

## Inputs

| Input | Type | Required | Notes |
| --- | --- | --- | --- |
| `accountId` | string | yes | A connected account from list_accounts. up to 200 characters |
| `groupIds` | string[] | no | REPLACES every group the account is in; an empty list takes it out of all. up to 20 items |
| `addGroupIds` | string[] | no | Adds groups and keeps the ones it is in. up to 20 items |

The fields inside an object or a list are in the JSON Schema at [/developers/mcp-tools.json](/developers/mcp-tools.json).

## Returns

| Field | Type | Notes |
| --- | --- | --- |
| `accountId` | string | The account. |
| `groupIds` | string[] | The groups it sits in now. |
| `approvalsWithdrawn` | string[] | Slideshows whose approval this took back, because the accounts they post to changed. |
| `note` | string | What to tell the user. |

## Example call

Send it to `POST https://wavegrain.com/api/mcp` with an access key that has the `write` permission; [Authentication](/developers/authentication) shows how to make one.

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_account_groups",
    "arguments": {
      "accountId": "<accountId>"
    }
  }
}
```

The call shows only the required inputs, with placeholder values: put your own in.

## Related tools

- [`update_caption`](/developers/mcp-tools/update_caption): Change a post caption
- [`cancel_queued_post`](/developers/mcp-tools/cancel_queued_post): Cancel a queued post
- [`create_account_group`](/developers/mcp-tools/create_account_group): Create an account group
- [`update_group_settings`](/developers/mcp-tools/update_group_settings): Change group settings
- [`create_brand`](/developers/mcp-tools/create_brand): Make a brand from a description
- [`update_brand_settings`](/developers/mcp-tools/update_brand_settings): Change brand settings
- [All 79 tools](/developers/mcp-tools)
