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

# Post idp group mappings groups

> Creates or updates an individual `IdpGroupMapping` object (upsert operation).

**Behavior:**
- If the mapping doesn't exist, it will be created with the provided values
- If the mapping exists, only the fields provided in the request will be updated




## OpenAPI

````yaml https://app.opal.dev/openapi.yaml post /idp-group-mappings/{app_resource_id}/groups/{group_id}
openapi: 3.1.0
info:
  contact:
    email: hello@opal.dev
    name: Opal Team
    url: https://www.opal.dev/
  description: >-
    The Opal API is a RESTful API that allows you to interact with the Opal
    Security platform programmatically.
  title: Opal API
  version: '1.0'
servers:
  - description: Production
    url: https://api.opal.dev/v1
security: []
tags:
  - name: access-rules
    description: Operations related to access rules
  - name: apps
    description: Operations related to apps
  - name: bundles
    description: Operations related to bundles
  - name: configuration-templates
    description: Operations related to configuration templates
  - name: delegations
    description: Operations related to request reviewer delegations
  - name: events
    description: Operations related to events
  - name: groups
    description: Operations related to groups
  - name: group-bindings
    description: Operations related to group bindings
  - name: idp-group-mappings
    description: Operations related to IDP group mappings
  - name: message-channels
    description: Operations related to message channels
  - name: non-human-identities
    description: Operations related to non-human identities
  - name: on-call-schedules
    description: Operations related to on-call schedules
  - name: owners
    description: Operations related to owners
  - name: requests
    description: Operations related to requests
  - name: resources
    description: Operations related to resources
  - name: sessions
    description: Operations related to sessions
  - name: tags
    description: Operations related to tags
  - name: tokens
    description: Operations related to API tokens
  - name: uars
    description: Operations related to UARs
  - name: users
    description: Operations related to users
paths:
  /idp-group-mappings/{app_resource_id}/groups/{group_id}:
    post:
      tags:
        - idp-group-mappings
      description: >
        Creates or updates an individual `IdpGroupMapping` object (upsert
        operation).


        **Behavior:**

        - If the mapping doesn't exist, it will be created with the provided
        values

        - If the mapping exists, only the fields provided in the request will be
        updated
      operationId: createIdpGroupMapping
      parameters:
        - description: The ID of the Okta app.
          example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
          explode: false
          in: path
          name: app_resource_id
          required: true
          schema:
            type: string
            format: uuid
          style: simple
        - description: The ID of the group.
          example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
          explode: false
          in: path
          name: group_id
          required: true
          schema:
            type: string
            format: uuid
          style: simple
      requestBody:
        required: false
        content:
          application/json:
            schema:
              properties:
                alias:
                  description: Optional alias for the group mapping
                  type: string
                  nullable: true
                hidden_from_end_user:
                  description: >
                    Whether this mapping should be hidden from end users.

                    - **New mappings**: If not provided, defaults to `false`

                    - **Existing mappings**: If not provided, existing value is
                    preserved (no change)

                    - **Explicit values**: If provided, value is updated to the
                    specified boolean
                  type: boolean
                  nullable: true
              type: object
      responses:
        '200':
          description: The IDP group mapping was successfully created or updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdpGroupMapping'
      security:
        - BearerAuth: []
components:
  schemas:
    IdpGroupMapping:
      description: Information about a group mapping.
      example:
        app_resource_id: 1520617d-e72a-47f5-a84c-693817ab48ad2
        group_id: 6f99639b-7928-4043-8184-47cbc6766145
        alias: finance-team
        hidden_from_end_user: false
      properties:
        app_resource_id:
          description: The ID of the app resource.
          example: 1520617d-e72a-47f5-a84c-693817ab48ad2
          format: uuid
          type: string
        group_id:
          description: The ID of the group.
          example: 6f99639b-7928-4043-8184-47cbc6766145
          format: uuid
          type: string
        alias:
          description: The alias of the group.
          example: finance-team
          type: string
        hidden_from_end_user:
          description: >-
            A bool representing whether or not the group is hidden from the end
            user.
          example: false
          type: boolean
      required:
        - group_id
        - hidden_from_end_user
      type: object
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http

````