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

# Add Group to Organization

> Add a new IdP group to an organization

Requires an enterprise admin personal API key.

Adds an enterprise IdP (Identity Provider) group to a specific organization with a specified role.


## OpenAPI

````yaml /v2-openapi.yaml POST /v2/enterprise/organizations/{org_id}/groups
openapi: 3.1.0
info:
  description: Devin v2 API with Personal API Keys for Enterprise Admins
  title: Devin API v2
  version: 2.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v2/enterprise/organizations/{org_id}/groups:
    post:
      tags:
        - organizations
      summary: Enterprise Organization Groups Addition Endpoint
      description: Add a new group to an organization
      operationId: >-
        enterprise_organization_groups_addition_endpoint_v2_enterprise_organizations__org_id__groups_post
      parameters:
        - in: path
          name: org_id
          required: true
          schema:
            title: Org Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrgGroup'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationGroupResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    OrgGroup:
      properties:
        group_name:
          title: Group Name
          type: string
        role:
          title: Role
          type: string
      required:
        - group_name
        - role
      title: OrgGroup
      type: object
    OrganizationGroupResponse:
      properties:
        group_name:
          title: Group Name
          type: string
        org_id:
          title: Org Id
          type: string
        role:
          title: Role
          type: string
      required:
        - org_id
        - group_name
        - role
      title: OrganizationGroupResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: Personal API Key (apk_user_*) for Enterprise Admins only
      scheme: bearer
      type: http

````