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

# Send User Invitation (Upsert)

> Send a user invitation to a user. If the user already has an invitation, the invitation will be updated.



## OpenAPI

````yaml POST /v1/user-invitations
openapi: 3.0.3
info:
  title: NRAI Documentation
  version: 0.0.0
servers:
  - url: https://cloud.nrai.io/api
    description: Production Server
security: []
externalDocs:
  url: https://nrai.io/docs
  description: Find more info here
paths:
  /v1/user-invitations:
    post:
      tags:
        - user-invitations
      description: >-
        Send a user invitation to a user. If the user already has an invitation,
        the invitation will be updated.
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - PROJECT
                    email:
                      type: string
                    projectId:
                      type: string
                    projectRole:
                      type: string
                  required:
                    - type
                    - email
                    - projectId
                    - projectRole
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                        - PLATFORM
                    email:
                      type: string
                    platformRole:
                      anyOf:
                        - type: string
                          enum:
                            - ADMIN
                        - type: string
                          enum:
                            - MEMBER
                        - type: string
                          enum:
                            - OPERATOR
                  required:
                    - type
                    - email
                    - platformRole
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  created:
                    type: string
                  updated:
                    type: string
                  email:
                    type: string
                  status:
                    anyOf:
                      - type: string
                        enum:
                          - PENDING
                      - type: string
                        enum:
                          - ACCEPTED
                  type:
                    anyOf:
                      - type: string
                        enum:
                          - PLATFORM
                      - type: string
                        enum:
                          - PROJECT
                  platformId:
                    type: string
                  platformRole:
                    type: string
                    enum:
                      - ADMIN
                      - MEMBER
                      - OPERATOR
                    nullable: true
                  projectId:
                    type: string
                    nullable: true
                  projectRoleId:
                    type: string
                    nullable: true
                  projectRole:
                    type: object
                    properties:
                      id:
                        type: string
                      created:
                        type: string
                      updated:
                        type: string
                      name:
                        type: string
                      permissions:
                        type: array
                        items:
                          type: string
                      platformId:
                        type: string
                      type:
                        type: string
                      userCount:
                        type: number
                    required:
                      - id
                      - created
                      - updated
                      - name
                      - permissions
                      - type
                    nullable: true
                  link:
                    type: string
                required:
                  - id
                  - created
                  - updated
                  - email
                  - status
                  - type
                  - platformId
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: http
      description: Use your api key generated from the admin console
      scheme: bearer

````