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

# Create UserInvitation

> Creates a new invitation for a user and sends an email with a login link.



## OpenAPI

````yaml /api/iam/api/user.openapi.json post /v1/userInvitations
openapi: 3.1.0
info:
  title: Confidence User API
  version: 1.0.0
  description: API documentation for user
servers: []
security: []
paths:
  /v1/userInvitations:
    post:
      summary: Create UserInvitation
      description: >-
        Creates a new invitation for a user and sends an email with a login
        link.
      operationId: UserInvitation.create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: >-
                    Name of the invitation on the form
                    `userInvitations/{"<"}id{">"}`.
                invitedEmail:
                  type: string
                  description: The email to the send the invitation to
                ttl:
                  type: object
                  description: >-
                    The duration from create that the invite expires and is no
                    longer valid. Defaults to 7 days if not specified.
                disableInvitationEmail:
                  type: boolean
                  description: If true, no email will be sent with the invitation link.
                labels:
                  type: array
                  items:
                    type: object
                    additionalProperties:
                      type: string
                  description: General labels for this resource.
              required:
                - invitedEmail
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                    description: >-
                      Name of the invitation on the form
                      `userInvitations/{"<"}id{">"}`.
                  invitedEmail:
                    type: string
                    description: The email to the send the invitation to
                  inviter:
                    type: string
                    description: >-
                      The person that initiated the invite. The email sent to
                      `invited_email` will contain this name. If not sent and
                       the token is an end user token the name of the currently logged in user will be used.
                       Required if the token is an API client token.
                  ttl:
                    type: object
                    description: >-
                      The duration from create that the invite expires and is no
                      longer valid. Defaults to 7 days if not specified.
                  expirationTime:
                    type: object
                    description: >-
                      The absolute time that the invite expires and is no longer
                      valid.
                  invitationUri:
                    type: string
                    description: URI for accepting the invite.
                  invitationToken:
                    type: string
                    description: Token required to accept the invite (part of the URI).
                  disableInvitationEmail:
                    type: boolean
                    description: If true, no email will be sent with the invitation link.
                  createTime:
                    type: object
                    description: Time when the user invitation was first created.
                  updateTime:
                    type: object
                    description: Time when the user invitation was last updated.
                  creator:
                    type: string
                    description: >-
                      Reference to the identity that created this user
                      invitation.
                  updater:
                    type: string
                    description: >-
                      Reference to the identity that last updated this user
                      invitation.
                  labels:
                    type: array
                    items:
                      type: object
                      additionalProperties:
                        type: string
                    description: General labels for this resource.
                required:
                  - invitedEmail
                  - expirationTime
                  - invitationUri
                  - invitationToken
                  - createTime
                  - updateTime
                  - creator
                  - updater
      security:
        - admin: []
      servers:
        - url: https://iam.eu.confidence.dev
        - url: https://iam.us.confidence.dev
        - url: https://iam.confidence.dev
components:
  securitySchemes:
    admin:
      type: http
      scheme: bearer

````