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

# V0 - Add, update or remove employee (externalId)

> Creates, updates, or removes users in the organization. The request body is an array of user objects: each object is upserted (matched on `externalSourceId`); to remove a user, set `delete: true` on that user object. An invitation email is sent to new users by default — control with the `sendInvitationMail` query parameter.



## OpenAPI

````yaml openapi/findity-admin-api-1.json PUT /organizations/externalid/{externalId}/users/
openapi: 3.0.3
info:
  title: Findity Admin API
  description: ''
  version: 1.0.0
  contact:
    name: Findity Support
    email: support@findity.com
servers:
  - url: https://stage-expense.findity.com/api/admin
    description: Stage environment
  - url: https://expense.findity.com/api/admin
    description: Production environment
security:
  - bearerAuth: []
paths:
  /organizations/externalid/{externalId}/users/:
    put:
      tags:
        - Users
      summary: V0 - Add, update or remove employee (externalId)
      description: >-
        Creates, updates, or removes users in the organization. The request body
        is an array of user objects: each object is upserted (matched on
        `externalSourceId`); to remove a user, set `delete: true` on that user
        object. An invitation email is sent to new users by default — control
        with the `sendInvitationMail` query parameter.
      operationId: 4c0f9beb-7beb-439f-8021-889586914d9d
      parameters:
        - $ref: '#/components/parameters/externalId'
        - name: sendInvitationMail
          in: query
          schema:
            type: boolean
            default: 'true'
            description: >-
              When `true` (default), an invitation email is sent to newly
              created users. When `false`, no invitation email is sent.
        - name: Content-Type
          in: header
          schema:
            type: string
            default: application/json
            description: Standard `application/json` content type.
        - name: X-Findity-ApiVersion
          in: header
          schema:
            type: string
            default: '3'
            description: Findity API version. Use `3` for the current admin API.
      requestBody:
        description: >-
          Array of user objects to upsert in the organization. Set `delete:
          true` on a user object to remove that user.
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  externalSourceId:
                    type: string
                    example: '222'
                    description: >-
                      External source identifier of the user. Used to match an
                      existing user; if no match, a new user is created.
                  employeeId:
                    type: string
                    example: '12345'
                    description: >-
                      Employee identifier set by the organization. Must be
                      unique within the organization.
                  organizationalUnitExternalSourceId:
                    type: string
                    example: '1234567'
                    description: >-
                      External source id of the organizational unit (department)
                      the user belongs to.
                  title:
                    type: string
                    example: '12345'
                    description: Job title of the user.
                  admin:
                    type: boolean
                    example: 'false'
                    description: >-
                      Whether the user has administrator privileges in the
                      organization.
                  impersonatorEmployees:
                    description: >-
                      Other users in the organization who may impersonate this
                      user (e.g. to handle expenses on their behalf).
                    items:
                      type: array
                      properties:
                        externalSourceId:
                          type: string
                  endDate:
                    type: string
                    example: 2019-12-31T00:00:000Z
                    description: >-
                      Date the user stops being an active employee. ISO 8601. A
                      future date is allowed; a past date marks the employee as
                      ended.
                  person:
                    description: >-
                      Person profile attached to the user — the individual
                      identity the user represents. A Person can have multiple
                      Users across different Organizations within the same
                      client application.
                    properties:
                      externalSourceId:
                        type: string
                        example: external-source-id-1234
                        description: External source identifier of the person.
                      firstName:
                        type: string
                        example: Leif
                        description: First name of the person.
                      lastName:
                        type: string
                        example: Larsson
                        description: Last name of the person.
                      email:
                        type: string
                        example: example@findity.com
                        description: >-
                          Email address of the person. Must be unique per client
                          application unless the
                          `disableMultipleExternalSourceIds` setting is off.
                      clearExternalSourceIds:
                        type: boolean
                        example: false
                        description: >-
                          When `true`, all existing external source identifiers
                          on the person are cleared before applying the update.
                      address:
                        type: object
                        description: Postal address of the person.
                        properties:
                          street1:
                            type: string
                            example: Street 1
                            description: Street address line.
                          city:
                            type: string
                            example: The city
                            description: City.
                          postalCode:
                            type: string
                            example: 123 45
                            description: Postal code.
                          countryCode:
                            type: string
                            example: SE
                            description: ISO 3166-1 alpha-2 country code.
                  presetValues:
                    description: >-
                      Custom dimension values that are preset on the user,
                      optionally with temporary approver assignments.
                    items:
                      type: array
                      properties:
                        dimensionDefinitionId:
                          type: string
                          example: 2c23221a50df445f94049ea3358de6dc
                          description: >-
                            External id of the custom dimension definition that
                            the preset belongs to.
                        presetListValueId:
                          type: string
                          example: SomePresetListValueId
                          description: >-
                            External id of the value (from the dimension's list)
                            to preset on the user.
                        temporaryApprovers:
                          description: >-
                            Approver assignments that apply only within a
                            specified date range.
                          items:
                            type: object
                            properties:
                              externalSourceId:
                                type: string
                                example: approverObjectExternalSourceId
                                description: >-
                                  External identifier for this temporary
                                  approver assignment.
                              fromDate:
                                type: string
                                example: '2019-05-14T22:00:00.000Z'
                                description: >-
                                  Date when the approver assignment becomes
                                  active. ISO 8601.
                              toDate:
                                type: string
                                example: '2019-05-16T22:00:00.000Z'
                                description: >-
                                  Date when the approver assignment ends. ISO
                                  8601.
                              personExternalSourceId:
                                type: string
                                example: someExternalSourceId
                                description: >-
                                  External source id of the person acting as the
                                  approver.
      responses:
        '200':
          description: ''
          content:
            application/json:
              example:
                result: success
                description: users updated
                ongoingReports: []
                movedReports: []
components:
  parameters:
    externalId:
      in: path
      name: externalId
      required: true
      description: The external source id of the organization
      schema:
        type: string
      example: 6aeb86c4fb154c46b2b5a1977245ac67
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````