---
title: "List connection accounts (v3.1)"
method: GET
path: "/api/v3.1/connections/{connection_id}/accounts/"
tags: ["Accounts"]
---

# List connection accounts (v3.1)

`GET /api/v3.1/connections/{connection_id}/accounts/`

## Request

- Base URL: `https://embedded.improvado.io`
- URL: `https://embedded.improvado.io/api/v3.1/connections/{connection_id}/accounts/`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `dts_session_id`
- TypeScript: <https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/docs/api/v3.1/connections/:connection_id/accounts/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists the accounts of one connection in the workspace your token belongs to, sorted by `id`. Use it to pick the accounts a recipe extracts from.

The `id` values returned here are the ones `PUT /api/v3.1/automated-recipes/{recipe_id}/` accepts in `connections[].accounts[]`. Only accounts with `is_active: true` can be used there; the others are rejected with `account_unavailable`.

The trailing slash is mandatory on this path, unlike the v3 accounts operation.

The page holds 100 accounts by default and 100 at most; `next` and `previous` are full v3.1 URLs.

## Path parameters

- `connection_id` integer, required

## Query parameters

- `search` string
- `page` integer
- `page_size` integer

## Response `200`

One page of connection accounts

- ConnectionAccountPageV31: One page of connection accounts.
  - `count` integer: Total number of accounts matching the request.
  - `next` string, nullable: Full URL of the next page, or `null` on the last page.
  - `previous` string, nullable: Full URL of the previous page, or `null` on the first page.
  - `results` ConnectionAccountV31[]: Accounts on this page.
    - `id` integer: Account identifier. This is the only identifier a v3.1 recipe accepts in `connections[].accounts[].id`, and it is specific to this workspace.
    - `title` string: Account name.
    - `connection_id` integer: The connection this account belongs to.
    - `datasource_name` string: Data source of the connection, for example `facebook`.
    - `is_active` boolean: Whether the account is switched on. Only accounts with `is_active: true` can be put in a recipe; the rest are rejected when you configure one.
    - `enabled_for_embedded_extraction` boolean: Whether this account is enabled for extraction through the embedded API.
    - `currency` string, nullable: Currency of the account, or `null` when it has none.
    - `additional_params` object: Extra account settings, as set through the accounts update operation. `{}` when there are none.
    - `created_at` string, date-time: When the account was created.
    - `updated_at` string, date-time: When the account was last changed.

## Other responses

- `400`: A query parameter has a value this operation does not accept, or the request could not be processed at all. `bad_request` is the catch-all code for a 4xx that has no code of its own, so the same envelope can arrive with another 4xx status, for example 415.
- `401`: The bearer token is missing, invalid or expired
- `403`: The caller is authenticated but this operation is not available to them
- `404`: No such connection in this workspace. The same answer covers a connection that never existed, one that was deleted and one that belongs to another workspace.
- `405`: The HTTP method is not supported on this path
- `500`: Something failed on our side. The request was not served; retry later.
- `503`: Temporarily unavailable. The response carries the header `Retry-After: 30`, so wait 30 seconds and repeat the request.

---

[API](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3.md) - [All operations](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/revisions/a881099bd6c4?raw)
