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

# Create User Invite

> Start onboarding of a new user in a company.

<Info>This endpoint will return a 400 Status Code in case the email address provided is already in use</Info>


## OpenAPI

````yaml post /partner/v1/userinvites/
openapi: 3.0.3
info:
  title: paywise Partner API
  version: v1
  description: |

    Use our API to create and manage companies & users.

    Please refer to the [official docs][ref1] for more!

    [ref1]: https://docs.paywise.de/api-docs/partner-api/introduction
servers:
  - url: https://api.paywise.de
    description: Production environment
security: []
externalDocs:
  url: https://docs.paywise.de/api-docs/partner-api/
paths:
  /partner/v1/userinvites/:
    post:
      tags:
        - userinvites
      summary: Create User Invite
      description: Start onboarding of a new user in a company.
      operationId: create-user-invite
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserInviteSerlializerRequest'
            examples:
              CreateUserInviteRequestSample:
                value:
                  email: max@mustermann.com
                  success_url: Max
                  failure_url: Mustermann
                  company: 6196ba03-83f2-46ea-83e1-a087bd0c5acc
                  first_name: Max
                  last_name: Mustermann
                summary: Create User Invite Request Sample
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UserInviteSerlializerRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/UserInviteSerlializerRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInviteSerlializer'
              examples:
                CreateUserInviteResponseSample:
                  value:
                    id: c70e7a7b-8495-4a79-920e-25d4d0192511
                    email: max@mustermann.com
                    first_name: Max
                    last_name: Mustermann
                    company: d16bfc7a-453c-4ea6-834a-25a586b5e4d6
                    success_url: https://app.sample-partner.com/onboarding/success/
                    failure_url: https://app.sample-partner.com/onboarding/failure/
                    invite_url: >-
                      http://app.paywise.de/partner/onboarding/c70e7a7b-8495-4a79-920e-25d4d0192511/
                    expiry: '2024-10-07T11:52:57.968546+02:00'
                    status: OPEN
                  summary: Create User Invite Response Sample
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
          description: ''
        '401':
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    UserInviteSerlializerRequest:
      type: object
      properties:
        id:
          type: string
          minLength: 1
        email:
          type: string
          minLength: 1
          description: E-Mail of the user to invite
        first_name:
          type: string
          minLength: 1
          description: First name of the user
        last_name:
          type: string
          minLength: 1
          description: Last name of the user
        company:
          type: string
          format: uuid
          description: UUID of the company that the user is going to be part of
        success_url:
          type: string
          minLength: 1
          description: >-
            Success URL - the user will be redirected here after successfully
            completing authentication flow
        failure_url:
          type: string
          minLength: 1
          description: >-
            Failure URL - the user will be redirected here if either the flow
            was cancelled or not completed for any other reason
      required:
        - company
        - email
        - failure_url
        - success_url
    UserInviteSerlializer:
      type: object
      properties:
        id:
          type: string
        email:
          type: string
          description: E-Mail of the user to invite
        first_name:
          type: string
          description: First name of the user
        last_name:
          type: string
          description: Last name of the user
        company:
          type: string
          format: uuid
          description: UUID of the company that the user is going to be part of
        success_url:
          type: string
          description: >-
            Success URL - the user will be redirected here after successfully
            completing authentication flow
        failure_url:
          type: string
          description: >-
            Failure URL - the user will be redirected here if either the flow
            was cancelled or not completed for any other reason
        invite_url:
          type: string
          readOnly: true
          description: >-
            Invite URL - Redirect your User to this URL for tem to complete the
            onboading process
        expiry:
          type: string
          format: date-time
          readOnly: true
          description: >-
            Expiry date/time of the request. After this timestamp is expired,
            users will have to be re-registered with a new invite
        status:
          type: string
          readOnly: true
          description: Current status of the User invite
      required:
        - company
        - email
        - expiry
        - failure_url
        - invite_url
        - status
        - success_url
  securitySchemes:
    tokenAuth:
      type: http
      scheme: bearer

````