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

# Create a group

> User-facing API for creating a new group. The callee is automatically added with the `"owner"` role.




## OpenAPI

````yaml POST /me/groups
openapi: 3.1.0
info:
  title: Rownd API
  version: 1.0.0
servers:
  - url: https://api.rownd.io
    description: Rownd production environment
  - url: https://api.us-east-2.dev.rownd.io
    description: Rownd development environment
security:
  - hubAccessTokenForRowndApi: []
tags:
  - name: applications
  - name: application_creds
  - name: application_schemas
paths:
  /me/groups:
    post:
      tags:
        - groups
      description: >
        User-facing API for creating a new group. The callee is automatically
        added with the `"owner"` role.
      operationId: my_group_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Group'
      responses:
        '200':
          description: Group created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserGroup'
      security:
        - hubAccessToken: []
components:
  schemas:
    Group:
      properties:
        id:
          type: string
          readOnly: true
          description: The group ID
          example: group_a3l1n2lsnb3q0xbul9enjnh7
        name:
          type: string
          description: The group name
          example: My Teammates
        member_count:
          description: >
            This value is no longer provided by the API. The default value of 0
            will always be returned
          type: number
          readOnly: true
          default: 0
          deprecated: true
        app_id:
          type: string
          readOnly: true
          description: Rownd application ID
          example: '327677849595019856'
        admission_policy:
          type: string
          enum:
            - invite_only
            - open
          description: Set whether the group be open for anyone to join or by invite only
          default: invite_only
          example: invite_only
        meta:
          description: An object containing additional metadata for the group
          additionalProperties: true
          nullable: true
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        updated_by:
          $ref: '#/components/schemas/CreatedBy'
        created_by:
          $ref: '#/components/schemas/UpdatedBy'
    UserGroup:
      required:
        - group
        - member
      properties:
        group:
          $ref: '#/components/schemas/Group'
          description: The group
        member:
          $ref: '#/components/schemas/GroupMember'
          description: The group member
    CreatedAt:
      type: string
      format: date-time
      readOnly: true
      description: The ISO 8601 date-time that the resource was created
    UpdatedAt:
      type: string
      format: date-time
      readOnly: true
      description: The ISO 8601 date-time that the resource was updated
    CreatedBy:
      type: string
      readOnly: true
      example: user_t6ftnnmw55pamuhfo9xvw0yl
      description: The ID of the user that created the resource
    UpdatedBy:
      type: string
      readOnly: true
      example: user_t6ftnnmw55pamuhfo9xvw0yl
      description: The ID of the user that most recently updated the resource
    GroupMember:
      required:
        - user_id
        - roles
      properties:
        id:
          type: string
          readOnly: true
          description: The group member ID
          example: member_dnn5g4e3q6aptail2gr43kpj
        user_id:
          type: string
          description: >
            The ID of a user to add as a group member. The user must belong to
            the Rownd application.
          example: user_fbylaq38591cghym5pabupj2
        roles:
          type: array
          items:
            type: string
          description: >
            The roles that the member belongs. (The first member added or
            invited to a group will

            always be created with the 'owner' role along with any additional
            roles specified)
          example:
            - owner
            - editor
        state:
          $ref: '#/components/schemas/GroupMemberState'
        invited_by:
          type: string
          readOnly: true
          description: The authenticated party that invited the user to the group
        added_by:
          type: string
          readOnly: true
          description: The authenticated party that added the user to the gruop
        profile:
          $ref: '#/components/schemas/AppUserDataData'
          readOnly: true
        group_id:
          type: string
          readOnly: true
          description: The group ID
          example: group_ig42thhwf4cig25o7t9jtlyu
    GroupMemberState:
      type: string
      enum:
        - active
        - invite_pending
        - invite_rejected
      description: >
        The state of the group member. A member that has been invited will not
        go into the `active`

        state until they accept the invitation.
    AppUserDataData:
      description: User profile data
      additionalProperties: true
      x-rownd-modifiers:
        - name: generateUserDataObjectUrls
          phase: response
        - name: maskEncryptedValues
          phase: response
      example:
        user_id: user_a7b53gwdaml5jt7t71442nt7
        email: gary@foo.com
        first_name: Gary
        last_name: Jackson
  securitySchemes:
    hubAccessTokenForRowndApi:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>` where
        `<token>` is your Rownd JWT
    hubAccessToken:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>` where
        `<token>` is the user's Rownd JWT

````