# List user groups

Lists the user groups of the organization behind the API credential, ordered by name. Pass the returned `id` values in the `user_group_ids` field of `POST /users`.
Platform partners can list a connected organization's groups by sending that organization's account id in the `Onboarded-Connected-Account-Id` header.
User groups belong to an organization rather than to an account, so a test key and a live key for the same organization return the same groups with the same identifiers.

Endpoint: GET /api/v1/user_groups
Version: 0.0.1
Security: form_session, user_session, component_session, component_token, api_token

## Security:

  - `form_session` (unknown)
    http bearer Onboarded form session token

  - `user_session` (unknown)
    apiKey in cookie __session

  - `component_session` (unknown)
    apiKey in cookie __component

  - `component_token` (unknown)
    apiKey in header x-component-auth-token

  - `api_token` (unknown)
    http bearer Onboarded API token

## Query parameters:

  - `page` (string)
    1-based page number. There is no upper bound; values below 1 are clamped to 1.

  - `per_page` (string)
    a number between 1 and 100

  - `name` (string)
    Case-insensitive substring match on the group name. `admin` matches `Admins`.

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `data` (array, required)

  - `data.id` (string, required)
    User group identifier. Pass these values in `user_group_ids` when creating a user.

  - `data.name` (string, required)

  - `data.created_at` (string, required)
    a string to be decoded into a DateTime.Utc

  - `total` (number, required)

  - `current_page` (number, required)

  - `per_page` (number, required)

  - `total_pages` (number)

## Response 400:

  - `400` (unknown)
    The request did not match the expected schema

## Response 400 fields (application/json):

  - `issues` (array, required)

  - `issues._tag` (string, required)
    The tag identifying the type of parse issue
    Enum: "Pointer", "Unexpected", "Missing", "Composite", "Refinement", "Transformation", "Type", "Forbidden"

  - `issues.path` (array, required)
    The path to the property where the issue occurred

  - `issues.path._tag` (string, required)
    Enum: "symbol"

  - `issues.path.key` (string, required)

  - `issues.message` (string, required)
    A descriptive message explaining the issue

  - `message` (string, required)

  - `_tag` (string, required)
    Enum: "HttpApiDecodeError"

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `message` (string, required)

  - `_tag` (string, required)
    Enum: "Unauthorized"

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `message` (string, required)

  - `_tag` (string, required)
    Enum: "Forbidden"

