> ## 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 invite

> Platform API for creating a group invite



## OpenAPI

````yaml POST /applications/{app}/groups/{group}/invites
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:
  /applications/{app}/groups/{group}/invites:
    parameters:
      - $ref: '#/components/parameters/AppID'
      - $ref: '#/components/parameters/GroupID'
    post:
      tags:
        - groups
      description: Platform API for creating a group invite
      operationId: application_group_invite_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupInvite'
            examples:
              Invite with user ID:
                value:
                  user_id: user_ofr5pgvof4w6o94hgjg0urjy
                  roles:
                    - admin
                  redirect_url: /somewhere/on/my/site#
              Invite with email:
                value:
                  email: randy@foo.com
                  roles:
                    - admin
                  redirect_url: https://foo.com/somewhere/else/on/my/site#
      responses:
        '200':
          description: Group invite created successfully
          content:
            application/json:
              schema:
                properties:
                  link:
                    type: string
                    description: >
                      The invitation link. Your user will use this link to
                      accept the invite. 

                      For now, you will need to send this link to your users. In
                      the future, Rownd will 

                      automatically send out invites via email or SMS for you
                  invitation:
                    $ref: '#/components/schemas/GroupInvite'
      security:
        - appKey: []
          appSecret: []
        - hubAccessTokenForRowndApi: []
components:
  parameters:
    AppID:
      name: app
      in: path
      schema:
        type: string
      required: true
      description: Rownd application ID
    GroupID:
      name: group
      in: path
      schema:
        type: string
      required: true
      description: Group ID
  schemas:
    GroupInvite:
      required:
        - roles
      properties:
        id:
          type: string
          readOnly: true
          description: The group invite ID
          example: c92kd7td7z4myhu7z5y637cp
        group_id:
          type: string
          readOnly: true
          description: The group ID
          example: group_zjca79svvbqfeilwr8httcal
        roles:
          type: array
          items:
            type: string
          description: >
            The roles into which a group member will be added upon invite
            acceptance (The first 

            member invited to a group will always be created with the 'owner'
            role along with any

            additional roles specified)
          example:
            - editor
        state:
          type: string
          readOnly: true
          enum:
            - pending
            - accepted
            - rejected
          description: The state of the invite
        email:
          type: string
          description: >
            The email of a Rownd user in the specified application. This
            property is mutually exclusive 

            with `user_id` and `email`
          example: randy@foo.com
        phone:
          type: string
          description: >
            The phone number of a Rownd user in the specified application. This
            property is mutually

            exclusive with `user_id` and `email`
          example: 19199993333
        user_id:
          type: string
          description: >
            The ID of a Rownd user in the specified application. This property
            is mutually exclusive with 

            `phone` and `email`
          example: user_mni5316glfgwtgljboxrv2it
        user_lookup_value:
          type: string
          readOnly: true
          description: The email or phone number specified during creation
          example: randy@foo.com
        redirect_url:
          type: string
          description: >
            The relative or absolute path location to which a user will be
            directed after accepting the invite
          example: /somewhere/on/my/site#
        app_variant_id:
          type: string
          description: >
            The ID of an application variant for which this invite should be
            created. When a user accepts

            this invite, they will be added to the group as a member and signed
            into this application

            variant. (Learn about variants
            [here](/configuration/customizations/sub-brands))
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        created_by:
          $ref: '#/components/schemas/CreatedBy'
        accepted_by:
          type: string
          readOnly: true
          description: The ID of the user that accepted the invite
          example: user_vgzrk03xpenj6td8vwi9crh4
        ensured_user_id:
          type: string
          readOnly: true
          description: >-
            The ID of the user ensured by the provided `user_id` or
            `user_lookup_value`
    CreatedAt:
      type: string
      format: date-time
      readOnly: true
      description: The ISO 8601 date-time that the resource was created
    CreatedBy:
      type: string
      readOnly: true
      example: user_t6ftnnmw55pamuhfo9xvw0yl
      description: The ID of the user that created the resource
  securitySchemes:
    hubAccessTokenForRowndApi:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>` where
        `<token>` is your Rownd JWT
    appKey:
      type: apiKey
      in: header
      name: x-rownd-app-key
      description: >-
        The publishable key of your application credentials. ([more
        details](/configuration/app-credentials#appkey))
    appSecret:
      type: apiKey
      in: header
      name: x-rownd-app-secret
      description: >-
        The private secret of your application credentials. ([more
        details](/configuration/app-credentials#appsecret))

````