> ## Documentation Index
> Fetch the complete documentation index at: https://www.activepieces.com/docs/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.1.0
info:
  title: Activepieces Documentation
  version: 0.0.0
servers:
  - url: https://cloud.activepieces.com/api
    description: Production Server
security: []
externalDocs:
  url: https://www.activepieces.com/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:
                      type: string
                      enum:
                        - ADMIN
                        - MEMBER
                        - 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:
                    type: string
                    enum:
                      - PENDING
                      - ACCEPTED
                  type:
                    type: string
                    enum:
                      - PLATFORM
                      - PROJECT
                  platformId:
                    type: string
                  platformRole:
                    anyOf:
                      - type: string
                        enum:
                          - ADMIN
                          - MEMBER
                          - OPERATOR
                      - type: 'null'
                  projectId:
                    anyOf:
                      - type: string
                      - type: 'null'
                  projectRoleId:
                    anyOf:
                      - type: string
                      - type: 'null'
                  projectRole:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                          created:
                            type: string
                          updated:
                            type: string
                          name:
                            type: string
                          permissions:
                            type: array
                            items:
                              type: string
                          platformId:
                            anyOf:
                              - type: string
                              - type: 'null'
                          type:
                            type: string
                          userCount:
                            type: number
                        required:
                          - id
                          - created
                          - updated
                          - name
                          - permissions
                          - type
                        additionalProperties: false
                      - type: 'null'
                  link:
                    type: string
                required:
                  - id
                  - created
                  - updated
                  - email
                  - status
                  - type
                  - platformId
                additionalProperties: false
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: http
      description: Use your api key generated from the admin console
      scheme: bearer

````