# Get account groups

Returns a paginated list of account groups.
Use the `offset` and `limit` query parameters to page through results; `meta.total_count` gives the total number of matching account groups. Both user and business account groups are returned.
See the Accounts overview ([TOL](https://docs.upvest.co/products/tol/guides/accounts/accounts_overview) / [BYOL](https://docs.upvest.co/products/byol/guides/accounts/accounts_overview) / [Omnibus](https://docs.upvest.co/products/omnibus/guides/accounts/accounts_overview)) for account group types and the account hierarchy.

Endpoint: GET /account_groups
Version: 1.144.0
Security: oauth-client-credentials

## Query parameters:

  - `sort` (string)
    The field to sort the results by. One of `created_at` or `updated_at`; defaults to `created_at`.

  - `order` (string)
    Sort order of the result list if the `sort` parameter is specified. Use `ASC` for ascending or `DESC` for descending sort order.

  - `offset` (integer)
    Use the `offset` argument to specify where in the list of results to start when returning items for a particular query.

  - `limit` (integer)
    Use the `limit` argument to specify the maximum number of items returned.

## Header parameters:

  - `upvest-client-id` (string, required)
    Your client ID, issued by Upvest. Identifies the client making the request. Universally Unique Identifier (UUID).

  - `Authorization` (string, required)
    Bearer (access) token from the OAuth flow with correct scopes.
https://datatracker.ietf.org/doc/html/rfc6750

  - `signature` (string, required)
    https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header

  - `signature-input` (string, required)
    https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he

  - `upvest-api-version` (string)
    Upvest API version (Note: Do not include quotation marks)

## Response 200 fields (application/json):

  - `meta` (object, required)

  - `meta.offset` (integer, required)
    Amount of resource to offset in the response.

  - `meta.limit` (integer, required)
    Total limit of the response.

  - `meta.count` (integer, required)
    Count of the resources returned in the response.

  - `meta.total_count` (integer, required)
    Total count of all the resources.

  - `meta.sort` (string)
    The field that the list is sorted by.

  - `meta.order` (string)
    The ordering of the response.
* ASC - Ascending order
* DESC - Descending order
    Enum: "ASC", "DESC"

  - `data` (array, required)
    List of account groups matching the query.

  - `data.id` (string, required)
    Universally Unique Identifier (UUID) of the account group.

  - `data.created_at` (string, required)
    Date and time when the resource was created. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `data.updated_at` (string, required)
    Date and time when the resource was last updated. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)

  - `data.users` (array, required)
    The users associated with the account group, each with their relation type.

  - `data.users.id` (string)
    Unique identifier of the user, as a UUID.

  - `data.users.type` (string)
    Relation of the user to the account group.
* `OWNER` — The user owns the account group.
* `CHILD` — The user is the child in a child account group.
* `GUARDIAN` — The user is a guardian of a child account group.
    Enum: "OWNER", "CHILD", "GUARDIAN"

  - `data.status` (string, required)
    Status of the account group.
* `PENDING_APPROVAL` — Account group approval is pending — the account group is visible through our API but cannot be acted on.
* `ACTIVE` — Account group is active — full functionality of the Investment API is accessible.
* `CLOSING` — Account group is closing.
* `CLOSED` — Account group is closed.
* `LOCKED` — Account group is locked for all actions.
    Enum: "PENDING_APPROVAL", "ACTIVE", "CLOSING", "CLOSED", "LOCKED"

  - `data.type` (string, required)
    Account group type.
* PERSONAL - Account group of a person holding assets on their own behalf.
* LEGAL_ENTITY - Account group of a legal entity holding assets on behalf of their users.
* FRENCH_PEA - Account group of a french resident holding assets in Plan d'Epargne en Actions.
* ISA - Account group of a UK resident holding assets in an individual savings account.
* CHILD - Account group of a child user holding assets in a child account.
    Enum: "PERSONAL", "LEGAL_ENTITY", "FRENCH_PEA", "ISA", "CHILD"

  - `data.securities_account_number` (string, required)
    Official securities account number, assigned at account group level. A string of 7 to 12 digits.

  - `data.business_id` (string, required)
    Unique identifier for the business.

  - `data.type` (string, required)
    Account group type.
* BUSINESS - Account group of a business holding assets.
    Enum: "BUSINESS"

## Response 400 fields (application/problem+json):

  - `type` (string, required)
    URL to a document describing the error condition.

  - `status` (integer, required)
    Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

  - `title` (string)
    A short, human-readable title for the general error type; the title should not change for given types.

  - `detail` (string)
    A human-readable description of the specific error.

  - `instance` (string)
    This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

  - `request_id` (string)
    Correlation ID for the original request.

## Response 401 fields (application/problem+json):

  - `type` (string, required)
    URL to a document describing the error condition.

  - `status` (integer, required)
    Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

  - `title` (string)
    A short, human-readable title for the general error type; the title should not change for given types.

  - `detail` (string)
    A human-readable description of the specific error.

  - `instance` (string)
    This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

  - `request_id` (string)
    Correlation ID for the original request.

## Response 403 fields (application/problem+json):

  - `type` (string, required)
    URL to a document describing the error condition.

  - `status` (integer, required)
    Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

  - `title` (string)
    A short, human-readable title for the general error type; the title should not change for given types.

  - `detail` (string)
    A human-readable description of the specific error.

  - `instance` (string)
    This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

  - `request_id` (string)
    Correlation ID for the original request.

## Response 406 fields (application/problem+json):

  - `type` (string, required)
    URL to a document describing the error condition.

  - `status` (integer, required)
    Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

  - `title` (string)
    A short, human-readable title for the general error type; the title should not change for given types.

  - `detail` (string)
    A human-readable description of the specific error.

  - `instance` (string)
    This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

  - `request_id` (string)
    Correlation ID for the original request.

## Response 429 fields (application/problem+json):

  - `type` (string, required)
    URL to a document describing the error condition.

  - `status` (integer, required)
    Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

  - `title` (string)
    A short, human-readable title for the general error type; the title should not change for given types.

  - `detail` (string)
    A human-readable description of the specific error.

  - `instance` (string)
    This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

  - `request_id` (string)
    Correlation ID for the original request.

## Response 500 fields (application/problem+json):

  - `type` (string, required)
    URL to a document describing the error condition.

  - `status` (integer, required)
    Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

  - `title` (string)
    A short, human-readable title for the general error type; the title should not change for given types.

  - `detail` (string)
    A human-readable description of the specific error.

  - `instance` (string)
    This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

  - `request_id` (string)
    Correlation ID for the original request.

## Response 503 fields (application/problem+json):

  - `type` (string, required)
    URL to a document describing the error condition.

  - `status` (integer, required)
    Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

  - `title` (string)
    A short, human-readable title for the general error type; the title should not change for given types.

  - `detail` (string)
    A human-readable description of the specific error.

  - `instance` (string)
    This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

  - `request_id` (string)
    Correlation ID for the original request.

## Response 504 fields (application/problem+json):

  - `type` (string, required)
    URL to a document describing the error condition.

  - `status` (integer, required)
    Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers.

  - `title` (string)
    A short, human-readable title for the general error type; the title should not change for given types.

  - `detail` (string)
    A human-readable description of the specific error.

  - `instance` (string)
    This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response.

  - `request_id` (string)
    Correlation ID for the original request.

