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

# Create Group

> Create a new group



## OpenAPI

````yaml /api/openapi.yaml post /v1/groups
openapi: 3.0.3
info:
  title: Documentation Service API
  description: API documentation for Documentation Service
  version: 1.0.0
servers:
  - url: https://api.us.lexful.app
    description: US pod
security:
  - bearerAuth: []
    accountId: []
paths:
  /v1/groups:
    post:
      tags:
        - Groups
      summary: Create Group
      description: Create a new group
      requestBody:
        $ref: '#/components/requestBodies/post_v1_groups_request'
      responses:
        '201':
          $ref: '#/components/responses/CreateGroupResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  requestBodies:
    post_v1_groups_request:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/post_v1_groups_request_application_json'
  responses:
    CreateGroupResponse:
      description: Default Response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateGroupResponse_application_json'
    BadRequestResponse:
      description: Bad request - validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ForbiddenResponse:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerErrorResponse:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    post_v1_groups_request_application_json:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Group name
        description:
          type: string
          maxLength: 1000
          description: Optional group description
        organization_scopes:
          type: array
          items:
            type: string
          default: []
          description: Organization IDs user can access, can include "*" for wildcard
        denied_organization_scopes:
          type: array
          items:
            type: string
          default: []
          description: Organization IDs user cannot access
        denied_entity_types:
          type: array
          items:
            type: string
            format: uuid
          default: []
          description: Entity type IDs that users in this group cannot access
      required:
        - name
    CreateGroupResponse_application_json:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Group unique identifier
        name:
          type: string
          description: Group name
        description:
          type: string
          nullable: true
          description: Group description
        organization_scopes:
          type: array
          items:
            type: string
          description: Organization IDs user can access, can include "*" for wildcard
        denied_organization_scopes:
          type: array
          items:
            type: string
          description: Organization IDs user cannot access
        denied_entity_types:
          type: array
          items:
            type: string
          description: Entity type IDs that users in this group cannot access
        created_at:
          type: string
          format: date-time
          description: Group creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        created_by:
          type: string
          format: uuid
          description: User ID who created this group
        updated_by:
          type: string
          format: uuid
          description: User ID who last updated this group
      required:
        - id
        - name
        - organization_scopes
        - denied_organization_scopes
        - denied_entity_types
        - created_at
        - updated_at
    ErrorResponse:
      description: Bad request - validation error
      type: object
      properties:
        status:
          type: number
          description: HTTP status code
        message:
          type: string
          description: Error message
        error_id:
          type: string
          description: Unique error identifier
        error_code:
          type: string
          description: Error code
        developer_message:
          type: string
          description: Additional details for developers
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token
    accountId:
      type: apiKey
      in: header
      name: X-Account-ID
      description: Account ID

````