# Select company accounts for the ledger

Replaces the complete set of selected Plaid account IDs and imports their stored posted history. An empty list stops importing all accounts on this bank; existing ledger entries remain.

Access class: `workspace:admin`.

## Endpoint

`PUT /v1/accounting/plaid-connections/{itemId}/accounts`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| itemId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "account_ids": [
    "string"
  ]
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "configured": true
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
