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

# Replace a Firstbase person's profile via SCIM (full update)

> Performs a full replacement (PUT) of a person's SCIM attributes. All writable fields in the request body overwrite the existing values. Used by identity providers (IdPs) to keep person data in sync. Returns 409 if the updated `userName` conflicts with another existing user.



## OpenAPI

````yaml /openapi.json put /scim/v2/Users/{id}
openapi: 3.1.0
info:
  title: Firstbase API Specification Beta
  description: Integration endpoints for Firstbase
  version: 0.1.0
servers:
  - url: /
    description: Default
security:
  - ApiKey: []
tags:
  - name: Inventory Orders
    description: Create and manage inventory orders
  - name: Shipment Notices V1
    description: 'Query shipment notice orders (V1: package items expose `inventories` list)'
  - name: Packages
    description: ''
  - name: Categories
    description: Query available categories for asset creation
  - name: Catalog
    description: ''
  - name: New Joiners
    description: New joiner provisioning pipeline for the organization
  - name: Orders
    description: ''
  - name: People
    description: >-
      Manage the users of Firstbase for your organization. API follows the SCIM
      standard.
    externalDocs:
      url: https://scim.cloud/
  - name: People — Lifecycle
    description: Offboard and reactivate users.
  - name: Assets
    description: Manage inventory assets
  - name: Regions V1
    description: Query regions (V1)
  - name: Warehouses V1
    description: Query warehouses (V1)
  - name: Brands
    description: Query available brands for asset creation
  - name: Inventory
    description: ''
  - name: Replacements
    description: Create and manage equipment replacements
  - name: Offices
    description: Manage and query office locations for the authenticated organization
  - name: Returns
    description: Return and Replacements
paths:
  /scim/v2/Users/{id}:
    put:
      tags:
        - People
      summary: Replace a Firstbase person's profile via SCIM (full update)
      description: >-
        Performs a full replacement (PUT) of a person's SCIM attributes. All
        writable fields in the request body overwrite the existing values. Used
        by identity providers (IdPs) to keep person data in sync. Returns 409 if
        the updated `userName` conflicts with another existing user.
      operationId: updateUser
      parameters:
        - name: attributes
          in: query
          description: >-
            Comma-separated SCIM defined attributes to be returned. Required
            attributes are always returned
          required: false
          schema:
            type: string
        - name: excludedAttributes
          in: query
          description: >-
            Comma-separated SCIM defined attributes to be excluded. Required
            attributes cannot be excluded
          required: false
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/scim+json:
            schema:
              $ref: '#/components/schemas/UserSchema'
        required: true
      responses:
        '200':
          description: User has been updated
          content:
            application/scim+json:
              schema:
                $ref: '#/components/schemas/UserSchema'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicApiHttpErrors'
        '404':
          description: Unable to find person, organization or package
          content:
            application/scim+json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
              examples:
                '404':
                  summary: User not found
                  description: '404'
                  value:
                    schemas:
                      - urn:ietf:params:scim:api:messages:2.0:Error
                    detail: Resource 2819c223-7f76-453a-919d-413861904646 not found
                    status: '404'
        '409':
          description: Unable to update user due to conflict
          content:
            application/scim+json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
              examples:
                '409':
                  summary: A user with this userName already exists
                  description: '409'
                  value:
                    schemas:
                      - urn:ietf:params:scim:api:messages:2.0:Error
                    detail: Resource already exists
                    scimType: uniqueness
                    status: '409'
components:
  schemas:
    UserSchema:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        addresses:
          type: array
          description: >-
            A physical mailing address for this user. If multiple addresses are
            present, the element that will be used as the user's Firstbase
            address will be selected by the following precedence: type `home`
            marked as `primary`, the first `home` address, the `primary`
            address, otherwise the first provided address.
          items:
            $ref: '#/components/schemas/Address'
        userName:
          type: string
          description: The userName must match the `primary` email address.
          example: jenny.smith@example.com
        emails:
          type: array
          description: >-
            Email addresses for the user. If multiple addresses are present, the
            `primary` will be used, otherwise the first element will be the
            user's Firstbase primary email AND userName.
          items:
            $ref: '#/components/schemas/Email'
        name:
          $ref: '#/components/schemas/Name'
          description: The components of the user's name.
        phoneNumbers:
          type: array
          description: >-
            Phone numbers for the user. The value SHOULD be specified according
            to the format defined in [RFC3966], e.g., 'tel:+1-201-555-0123' If
            multiple phone numbers are present, the `primary` otherwise the
            first element will be the user's Firstbase phone number.
          items:
            $ref: '#/components/schemas/PhoneNumber'
        urn:ietf:params:scim:schemas:extension:firstbase:1.0:User:
          $ref: '#/components/schemas/FirstbaseUser'
          description: >-
            Define attributes of the User's on-boarding, including their initial
            package ID and start date.
        schemas:
          type: array
          description: The schemas defining the attributes of the resources.
          example:
            - urn:ietf:params:scim:schemas:core:2.0:User
            - urn:ietf:params:scim:schemas:extension:firstbase:1.0:User
          items:
            type: string
      required:
        - addresses
        - emails
        - id
        - name
        - schemas
        - urn:ietf:params:scim:schemas:extension:firstbase:1.0:User
        - userName
    PublicApiHttpErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/PublicApiError'
      required:
        - errors
    ErrorSchema:
      type: object
      properties:
        schemas:
          type: array
          items:
            type: string
        detail:
          type: string
        scimType:
          type: string
        status:
          type: string
      required:
        - detail
        - schemas
        - status
    Address:
      type: object
      properties:
        country:
          type: string
          description: >-
            The country name component. The value MUST be in ISO 3166-1
            "alpha-2" code format.
          example: US
        locality:
          type: string
          description: The city or locality component.
          example: New York City
        postalCode:
          type: string
          description: The zip code or postal code component.
          example: 10123
        region:
          type: string
          description: The state or region component.
          example: NY
        streetAddress:
          type: string
          description: >-
            The full street address component, which may include house number,
            street name, P.O. box, and multi-line extended street address
            information.  This attribute MAY contain newlines. Only the first 2
            lines will be used.
          example: 123
        primary:
          type: boolean
          description: When true, the address will be the user's mailing address.
          example: true
      required:
        - country
    Email:
      type: object
      properties:
        value:
          type: string
          example: jenny.smith@example.com
        primary:
          type: boolean
          example: true
      required:
        - value
    Name:
      type: object
      properties:
        familyName:
          type: string
          example: Smith
        givenName:
          type: string
          example: Jenny
      required:
        - familyName
        - givenName
    PhoneNumber:
      type: object
      properties:
        value:
          type: string
          example: 1+555-867-5309
        primary:
          type: boolean
          example: true
      required:
        - value
    FirstbaseUser:
      type: object
      properties:
        packageId:
          type: string
          format: uuid
          example: d1b0fd87-5fc9-410c-b641-0b7146896ccd
        startDate:
          type: string
          example: '2022-02-01'
        status:
          type: string
          enum:
            - INVITED
            - ACTIVE
            - INACTIVE
            - DELETED
            - OFFBOARDING
            - CANNOT_REACTIVATE
          example: ACTIVE
        skipUserActivation:
          type: boolean
          example: false
        cpfNumber:
          type: string
          example: 87456236985
      required:
        - skipUserActivation
    PublicApiError:
      type: object
      properties:
        detail:
          type: string
          description: Human-readable description of the error
          example: Invalid request
        source:
          type: string
          description: >-
            Entity or field path that caused the error (for example order,
            shipmentNotice, or person:email)
          example: request
      required:
        - detail
        - source
  securitySchemes:
    ApiKey:
      type: apiKey
      description: Prefix the value with "ApiKey" to indicate the custom authorization type
      name: Authorization
      in: header

````