> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plerion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search groups with a request body

> The same filtering as the list endpoint, with the parameters in the body. Works with a read key.



## OpenAPI

````yaml /api-reference/scim-openapi.yaml post /v1/organization/scim/v2/Groups/.search
openapi: 3.1.0
info:
  title: Plerion SCIM 2.0 provisioning API
  version: v1
  termsOfService: https://www.plerion.com/terms-and-conditions
  contact:
    name: Plerion Pty Ltd
    url: https://www.plerion.com/contact-us
    email: support@plerion.com
  license:
    name: Plerion Use License
    url: https://www.plerion.com/terms-and-conditions
  description: |-
    The Plerion SCIM 2.0 provisioning API lets an identity provider create,
    update, deactivate, and delete users in a Plerion organization, and keep
    its groups in sync as Plerion user groups. It follows RFC 7643 (schema)
    and RFC 7644 (protocol), so any SCIM 2.0 client can use it.

    SCIM carries users and groups, not roles. Roles are granted to user
    groups in the Plerion console, and every member holds them. Groups
    created through this API are owned by the identity provider: their name
    and membership cannot be edited in Plerion, and this API sees only the
    groups it created.

    Requests are authenticated with a Plerion organization API key sent as
    a bearer token. The organization is resolved from the key, so no request
    names an organization. Write operations need a key with the readWrite
    access level.

    The Plerion console shows the exact SCIM base URL for your organization
    in the SCIM provisioning section of your single sign-on settings. Paste
    that value into your identity provider rather than assembling it by
    hand. For setup instructions, see the SCIM provisioning guides.
servers:
  - url: https://{region}.api.plerion.com
    description: Production API server - Select your preferred region
    variables:
      region:
        default: au
        enum:
          - au
          - sg1
          - in1
          - us1
security:
  - organizationApiKey: []
tags:
  - name: Discovery
    x-displayName: Discovery
    description: >-
      The SCIM discovery endpoints describe what this service supports. Identity
      providers read them automatically when you test a connection, and they
      advertise only the features that are actually available.
  - name: Users
    x-displayName: Users
    description: >-
      Create, read, update, deactivate, and delete users in a Plerion
      organization. Writes need an organization API key with the readWrite
      access level.
  - name: Groups
    x-displayName: Groups
    description: >-
      Create, read, update, and delete the user groups your identity provider
      manages, and their membership. Members must be users this API provisioned.
      Writes need an organization API key with the readWrite access level.
paths:
  /v1/organization/scim/v2/Groups/.search:
    post:
      tags:
        - Groups
      summary: Search groups with a request body
      description: >-
        The same filtering as the list endpoint, with the parameters in the
        body. Works with a read key.
      operationId: searchGroups
      requestBody:
        required: true
        content:
          application/scim+json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
      responses:
        '200':
          description: Filtered, sorted, paginated list of groups.
          content:
            application/scim+json:
              schema:
                $ref: '#/components/schemas/GroupListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    SearchRequest:
      type: object
      description: RFC 7644 §3.4.3 search request.
      properties:
        schemas:
          type: array
          items:
            type: string
            const: urn:ietf:params:scim:api:messages:2.0:SearchRequest
        filter:
          type: string
        sortBy:
          type: string
        sortOrder:
          type: string
          enum:
            - ascending
            - descending
        startIndex:
          type: integer
          minimum: 1
        count:
          type: integer
          minimum: 0
          maximum: 1000
        attributes:
          type: array
          items:
            type: string
        excludedAttributes:
          type: array
          items:
            type: string
      required:
        - schemas
    GroupListResponse:
      type: object
      properties:
        schemas:
          type: array
          items:
            type: string
            const: urn:ietf:params:scim:api:messages:2.0:ListResponse
        totalResults:
          type: integer
        startIndex:
          type: integer
        itemsPerPage:
          type: integer
        Resources:
          type: array
          items:
            $ref: '#/components/schemas/Group'
      required:
        - schemas
        - totalResults
    Group:
      type: object
      description: >-
        SCIM core Group. The identity provider owns the name and the members; a
        Plerion organization admin grants the group its roles in the console.
      properties:
        schemas:
          type: array
          items:
            type: string
          example:
            - urn:ietf:params:scim:schemas:core:2.0:Group
        id:
          type: string
          format: uuid
          readOnly: true
        externalId:
          type: string
          description: The identity provider's identifier for the group. Filterable.
        displayName:
          type: string
          description: Required. Shown as the user group's name in the Plerion console.
        members:
          type: array
          items:
            $ref: '#/components/schemas/GroupMember'
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - schemas
        - displayName
    Error:
      type: object
      description: RFC 7644 §3.12 error response.
      properties:
        schemas:
          type: array
          items:
            type: string
            const: urn:ietf:params:scim:api:messages:2.0:Error
        status:
          type: string
          description: HTTP status code as a string.
          example: '409'
        scimType:
          type: string
          enum:
            - invalidSyntax
            - invalidFilter
            - invalidPath
            - invalidValue
            - mutability
            - uniqueness
        detail:
          type: string
          example: A user with this userName already exists.
      required:
        - schemas
        - status
    GroupMember:
      type: object
      properties:
        $ref: 986db0b8-9b37-4e72-aabf-a54c33e93758
        value:
          type: string
          format: uuid
          description: >-
            Plerion user id of the member. Must be a user this API provisioned;
            nested groups are not supported.
        display:
          type: string
          readOnly: true
      required:
        - value
    Meta:
      type: object
      readOnly: true
      properties:
        resourceType:
          type: string
          enum:
            - User
            - Group
        created:
          type: string
          format: date-time
        lastModified:
          type: string
          format: date-time
        version:
          type: string
          description: >
            Resource version identifier, for example W/"3". Conditional requests
            (If-Match, If-None-Match) are not supported.
        location:
          type: string
          format: uri
  responses:
    BadRequest:
      description: >
        Invalid request. The SCIM error body carries scimType invalidSyntax,
        invalidFilter, invalidPath, invalidValue, or mutability.
      content:
        application/scim+json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >
        Missing or invalid API key. Rejected before the request reaches the SCIM
        service, so the body is plain JSON rather than a SCIM error.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            example:
              message: Unauthorized
    TooManyRequests:
      description: Rate limited. Honor Retry-After and retry.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/scim+json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: >
        Plerion organization API key (plerion_oak_…), created by an organization
        admin in the Plerion console. Write operations require a key with
        readWrite access level; GET and .search work with read access level.

````