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

# Update User

> Updates an existing user's information in the organization. You can modify the user's name, email, team assignment, and role. Requires proper permissions to update user details.



## OpenAPI

````yaml /api-reference/openapi.json patch /organizations/users/{userId}
openapi: 3.0.1
info:
  title: Attention Service V2
  description: Attention Service API V2
  termsOfService: https://www.attention.com/terms-of-use
  contact:
    name: Attention Team
    url: https://docs.attention.com/welcome
    email: support@attention.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.8.0
servers:
  - url: https://api.attention.tech/v2
security:
  - APIKeyHeader: []
paths:
  /organizations/users/{userId}:
    patch:
      tags:
        - Organization
      summary: Update User
      description: >-
        Updates an existing user's information in the organization. You can
        modify the user's name, email, team assignment, and role. Requires
        proper permissions to update user details.
      operationId: updateUser
      parameters:
        - name: userId
          in: path
          description: UUID of the user to update
          required: true
          schema:
            type: string
      requestBody:
        description: The updated user information
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/UpdateUserRequest'
        required: true
      responses:
        '200':
          description: User successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateUserResponse'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/UpdateUserResponse'
        '400':
          description: Failed to fetch user or invalid update parameters
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
        '401':
          description: Valid API key required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Base_401_Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Base_401_Error'
        '422':
          description: Missing or invalid body parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Base_422_Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Base_422_Error'
        '500':
          description: Unexpected server error. Please try again later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Base_500_Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Base_500_Error'
        default:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateUserRequest:
      type: object
      properties:
        firstName:
          type: string
        lastName:
          type: string
        password:
          type: string
        botName:
          type: string
        dealsEnabled:
          type: boolean
        teamUUIDsToRemove:
          type: array
          items:
            type: string
        teamsToAdd:
          type: array
          items:
            $ref: '#/components/schemas/TeamRequest'
        roleUUID:
          type: string
          description: The UUID of the role assigned to the user.
        seat_type:
          type: string
          description: The type of seat assigned to the user.
          example: recording
          default: recording
          enum:
            - listener
            - recording
      example:
        firstName: John
        lastName: Doe
        password: newPassword123
        botName: JohnBot4
        dealsEnabled: false
        teamUUIDsToRemove:
          - 802a13d8-1ad0-4f4a-b880-9ace889fafa61
        teamsToAdd:
          - uuid: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
            primary: true
          - uuid: 802a13d8-1ad0-4f4a-b880-9ace889fafa6
            primary: false
        roleUUID: 84e67f54-5157-442b-a2b3-8b9c728b2fef1
        seat_type: recording
    UpdateUserResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/User'
      example:
        data:
          botName: John's Notetaker
          email: 15john.doe@example.com
          firstName: John
          lastName: Doe
          primaryTeamUUID: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
          roles:
            - name: Sales Rep
              type: SALES_REP
              uuid: 55906d03-2849-4c3c-a67f-da07a6300de4
          settings:
            autoCalculateCRMFields: true
            joinWhenIAmHostAndAlone: true
            joinWhenIAmHostWithPeers: true
            joinWhenUnlicensedPeerIsHost: true
            realTimeCapabilitiesOFF: true
            seat_type: recording
          transcriptLang: en
          uuid: c74eb7bc-7b0e-45e2-843a-67305bfc4dce
    Error:
      type: object
      properties:
        id:
          type: string
          description: A unique identifier for the error.
        status:
          type: string
          description: >-
            The HTTP status code applicable to this problem, expressed as a
            string value.
        code:
          type: string
          description: An application-specific error code, expressed as a string value.
        title:
          type: string
          description: A short, human-readable summary of the problem.
        detail:
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          properties: {}
      example:
        id: not_found_error
        status: '404'
        code: '404'
        title: Not Found Error
        detail: The requested resource was not found
        source:
          pointer: /data/attributes/id
    Base_401_Error:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/BaseError'
      example:
        code: 401
        message: unauthenticated for Invalid API key
    Base_422_Error:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/BaseError'
      example:
        code: 422
        message: Missing required fields in body
    Base_500_Error:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Error'
      example:
        code: '500'
        detail: >-
          An unexpected error occurred on the server. Please try again later or
          contact support if the problem persists.
        id: internal_server_error
        title: Internal Server Error
    TeamRequest:
      required:
        - uuid
      type: object
      properties:
        uuid:
          type: string
          description: The UUID of the team the user will belong to.
          example: f7c7fe28-ac4e-4181-a980-0f6ef98ca0e1
        primary:
          type: boolean
          description: Whether this team is the user's primary team.
          example: true
      example:
        uuid: f7c7fe28-ac4e-4181-a980-0f6ef98ca0e1
        primary: true
    User:
      type: object
      properties:
        uuid:
          type: string
          description: The unique identifier of the user.
          example: 123e4567-e89b-12d3-a456-426614174000
        email:
          type: string
          description: The email address of the user.
          example: user@example.com
        firstName:
          type: string
          description: The first name of the user.
          example: John
        lastName:
          type: string
          description: The last name of the user.
          example: Doe
        createdAt:
          type: string
          description: The date and time the user was created.
          example: '2021-01-01T00:00:00Z'
        deletedAt:
          type: string
          description: The date and time the user was deactivated.
          example: '2021-01-01T00:00:00Z'
        transcriptLang:
          type: string
          description: The preferred transcript language for the user.
          example: en-US
        joinOutsideHostMeetings:
          type: boolean
          description: >-
            Indicates if the user can join meetings outside their host
            organization.
          example: true
        realTimeCapabilities:
          type: boolean
          description: Indicates if the user has real-time transcription capabilities.
          example: false
        settings:
          $ref: '#/components/schemas/UserSettings'
        botName:
          type: string
          description: The name of the bot associated with the user.
          example: MyBot
        botImageURL:
          type: string
          description: The URL of the bot's profile image.
          example: https://example.com/bot.png
        primaryTeamUUID:
          type: string
          description: The UUID of the user's primary team.
          example: primary-team-uuid-12345
        organizationRoleUUID:
          type: string
          description: The UUID of the user's role in the organization.
          example: org-role-uuid-56789
        roles:
          type: array
          description: A list of roles assigned to the user.
          items:
            $ref: '#/components/schemas/Role'
        showReferralScreen:
          type: boolean
          description: Whether the user is shown a referral screen.
          example: false
        seatType:
          type: string
          description: The type of seat assigned to the user.
          example: admin
        teams:
          type: array
          description: A list of teams assigned to the user.
          items:
            $ref: '#/components/schemas/Team'
      example:
        uuid: 123e4567-e89b-12d3-a456-426614174000
        email: user@example.com
        firstName: John
        lastName: Doe
        createdAt: '2021-01-01T00:00:00Z'
        transcriptLang: en-US
        joinOutsideHostMeetings: true
        realTimeCapabilities: false
        botName: MyBot
        botImageURL: https://example.com/bot.png
        primaryTeamUUID: primary-team-uuid-12345
        organizationRoleUUID: org-role-uuid-56789
        showReferralScreen: false
        seatType: admin
    BaseError:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
      example:
        code: unauthorized
        message: Invalid or expired API key
    UserSettings:
      type: object
      properties:
        realTimeCapabilitiesOFF:
          type: boolean
        autoCalculateCRMFields:
          type: boolean
        joinWhenIAmHostAndAlone:
          type: boolean
        joinWhenIAmHostWithPeers:
          type: boolean
        joinWhenPeerIsHost:
          type: boolean
        joinWhenUnlicensedPeerIsHost:
          type: boolean
        dealsEnabled:
          type: boolean
      example:
        realTimeCapabilitiesOFF: true
        autoCalculateCRMFields: true
        joinWhenIAmHostAndAlone: true
        joinWhenIAmHostWithPeers: true
        joinWhenPeerIsHost: true
        joinWhenUnlicensedPeerIsHost: true
        dealsEnabled: true
    Role:
      type: object
      properties:
        uuid:
          type: string
        name:
          type: string
        type:
          type: string
      example:
        uuid: 84e67f54-5157-442b-a2b3-8b9c728b2fef
        name: Admin
        type: ADMIN
    Team:
      type: object
      properties:
        uuid:
          type: string
          description: Unique identifier of the team
          example: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
        name:
          type: string
          description: Name of the team
          example: Engineering
        phrases:
          type: array
          description: List of keywords or phrases associated with the team
          example:
            - engineering
            - tech
            - development
          items:
            type: string
        slackConnection:
          $ref: '#/components/schemas/SlackConnection'
        domain:
          type: string
          description: Domain associated with the team
          example: attention.tech
        organizerJoinInternalMeetings:
          type: boolean
          description: Whether team organizers can join internal meetings
          example: true
        consentEmailEnabled:
          type: boolean
          description: Whether email consent is enabled for the team
          example: true
        parentTeamUUID:
          type: string
          description: UUID of the parent team if this team is part of a hierarchy
          example: 2ccf9bde-68e3-4de4-bc4e-51b927336665
        organizationUUID:
          type: string
          description: UUID of the organization this team belongs to
          example: 16b78cec-82ef-46d2-8213-5d3bb7d2571c
        children:
          type: array
          description: List of child teams if this team has a hierarchical structure
          items:
            $ref: '#/components/schemas/Team'
      description: >-
        Represents a team in the system with its properties and hierarchical
        structure
      example:
        uuid: fe515723-fe2e-4959-a5fa-c4d3937fe7e4
        name: Engineering
        phrases:
          - engineering
          - tech
          - development
        domain: attention.tech
        organizerJoinInternalMeetings: true
        consentEmailEnabled: true
        parentTeamUUID: 2ccf9bde-68e3-4de4-bc4e-51b927336665
        organizationUUID: 16b78cec-82ef-46d2-8213-5d3bb7d2571c
    SlackConnection:
      type: object
      properties:
        id:
          type: string
          description: Slack connection identifier
          example: T1234567890
        info:
          $ref: '#/components/schemas/SlackTeamInfo'
      description: Represents the Slack integration details for a team
      example:
        id: T1234567890
        info:
          id: T01234567
          name: Acme Corp
    SlackTeamInfo:
      type: object
      properties:
        id:
          type: string
          description: Slack team identifier
          example: T1234567890
        name:
          type: string
          description: Name of the Slack team
          example: Attention Tech
      description: Information about a connected Slack team
      example:
        id: T01234567
        name: Acme Corp
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header

````